The game does not end once you are fighting. You can press Escape to return to the main menu and quit from there.
Enjoy playing!