DONETSK, Ukraine — To outward appearances, Fyodor D. Berezin is the picture of a senior military commander. He wears camouflage, has bodyguards and confidently gives orders as the newly named deputy defense minister of the separatist Donetsk People’s Republic. Yet, just four months ago he was an obscure author of 18 science fiction novels, one play and a dozen or so short stories.

In an interview, Mr. Berezin said he was as surprised as anybody by his rapid promotion through the rebel ranks. “Reality became scarier than science fiction,” he said in an interview over iced tea at the Havana Banana bar, a favorite rebel haunt. “I live in my books now. I fell right into the middle of my books.”

In the real war in eastern Ukraine, it is an inauspicious time to hold a high command in the separatist forces. Under relentless pounding by the Ukrainian military, their rebellion is crumbling. Government troops have advanced to the outskirts of Donetsk, and over the weekend broke into the rebels’ other remaining stronghold, Luhansk.

In the wake of these and other setbacks, President Vladimir V. Putin of Russia appears to be maneuvering for a face-saving settlement, analysts say, a way to escape a losing situation without puncturing his strongman image or antagonizing the ultranationalists at home who were expecting him to follow up his annexation of Crimea with an invasion of Ukraine.