FEODOSIA, Crimea — As former comrades saluted them from outside a base overrun by Russian forces, Ukrainian marines in Crimea piled into buses Tuesday to head back to the mainland.

It was a low-key exit from this eastern Black Sea port, with fewer than a dozen friends and relatives on hand to bid the marines farewell. A troop transporter bearing black Russian military plates trailed the bus as it pulled away.

Their departure came as Ukraine’s defense minister stepped down after harsh criticism for authorities’ often-hesitant reaction to Russia’s annexation of Crimea, which was formalized following a hastily organized referendum this month.

Troops were given the stark choice of either staying in Crimea and switching allegiance to serve under Russia’s military, or leaving the peninsula to keep their jobs with the Ukrainian defense forces.

“The Russians threatened, intimidated, bullied and tried to get us to switch sides to Russia. It has been very difficult to resist this enormous pressure but I have made a choice that I can live with,” Senior Lt. Anatoly Mozgovoy said after arriving in the Ukrainian city of Genichesk.

“We were greeted as heroes in Ukraine. I was able to breathe freely for the first time in months,” the 30-year-old Mozgovoy said.

He said he left behind his wife and 7-month-old daughter, who were staying with his mother-in-law in Crimea until he finds out where he is being permanently deployed.

So far, 131 Ukrainian marines have left Crimea, the defense ministry said. They were being temporarily stationed at a military barracks in Genichesk but their final destination was still unclear.

In an address to parliament in the capital, Kiev, Defense Minister Igor Tenyukh denied that he had failed to issue clear instructions to his troops but reserved the right to resign. The order to withdraw from Crimea was issued Monday, a week after many bases had already been stormed and seized by pro-Russian forces.

About 4,300 Ukrainian servicemen and 2,200 of their relatives have asked to leave Crimea, Tenyukh said Tuesday.