BEIRUT — Syrian government troops on Thursday flushed out rebels who had stormed a prison compound in the northern city of Aleppo in a bid to free hundreds of political prisoners inside.

The forced retreat was the latest setback for fighters seeking to topple President Bashar Assad, whose forces have been gaining ground in the country's civil war.

Comment on this story

In Washington, President Barack Obama and the Turkish prime minister projected a united front on Syria, despite sharp differences about how much the U.S. should intervene.

"There's no magic formula for dealing with an extraordinarily violent and difficult situation like Syria," Obama said at a joint news conference with Prime Minister Recep Tayyip Erdogan in which he pledged that the U.S. and Turkey would ramp up pressure to oust Assad from power.

Forces loyal to Assad have recently made advances in strategically important locations across the country, including in areas around the capital, Damascus, and in the country's south, near the border with Jordan.