The election agreement cooled rising tensions between two very distinct political leaders, which threatened to escalate earlier on Saturday.
About 3,600 troops loyal to Yushchenko were barred from reaching the capital, Kiev, by police before the deal was signed.
The elite forces - charged with "protecting public order", according to the presidential office - were stopped at checkpoints around the country under orders from the interior ministry.
Kostyantin Stogny, a ministry spokesman, said: "The interior minister has given an order forbidding the movement of internal troops towards Kiev so that they do not upset public order."
Some internal force commanders chose to stay in barracks out of loyalty to the government, an interior ministry spokesman said.
The current political crisis started last month when Yushchenko issued an order to disband parliament and hold new elections, drawing opposition from Yanukovych.
Yushchenko on Friday issued an order taking control of the interior ministry's military branch away from the government, led by Yanukovych.
Yanukovych's allies described Yushchenko's order as a "coup attempt".
Vasyl Tsushko, the interior minister, said: "It's necessary to calm down. There won't be any use of force. We won't storm anything."
The feud escalated on Thursday when a paramilitary unit from the interior ministry scuffled with members of a presidential security force outside the Kiev office of Svyatoslav Piskun, the country's prosecutor general.
The paramilitaries intervened to protect Piskun, who is pro-Yanukovych, after Yushchenko ordered his dismissal.
Control over interior ministry forces was crucial in the Orange Revolution of 2004.
Mass street protests helped bring Yushchenko to the presidency, overturning a flawed vote initially in Yanukovych's favour.
Yushchenko has sought to lead Ukraine into the EU and Nato, while Yanukovych wishes to preserve close ties with Moscow.