KIEV, Ukraine — Ukraine spiraled deeper into disarray on Wednesday as the government of President Viktor F. Yanukovych and several thousand grimly determined protesters, along with their supporters in Russia and Europe, faced off in a confrontation over the fate of this fractured country of 46 million.

As measures of the turmoil, the authorities announced a nationwide “antiterrorist operation” to keep guns and power from what it called extremist groups, and they dismissed the country’s top general. But very late in the day, they declared that a truce had been reached with political leaders of the opposition, who confirmed that overnight.

The party website of an opposition leader, Vitali Klitschko, said the opposition had received assurances that there would be “no assault” on the main protest site, though it was uncertain that a pause in the conflict would hold, particularly among more determined street fighters.

The agreement was announced after indications — including the deployment of paratroopers to help protect military bases — that the Ukrainian authorities were concerned about maintaining control, particularly in the country’s west.