As many as 500 pro-Russian insurgents assaulted a border command center in a key eastern Ukrainian city before dawn Monday, sparking a furious battle that raged throughout the day and into the night.

The attack, by rebels armed with rocket-propelled grenades and mortars, was perhaps the largest and most coordinated assault on a Ukrainian government building in the nearly two months that separatists have waged their insurgency here.

The scale of the fight reflected the critical importance of the border to both sides. In recent weeks, it has been penetrated frequently by separatists bringing reinforcements and supplies from Russia to eastern Ukraine. The shipments have helped transform the insurgency from a somewhat ragtag guerrilla force to one capable of carrying out major military assaults.

That transformation was readily apparent Monday, and it struck an ominous note for Ukraine’s prospects of hanging on to its southeastern provinces.

Lt. Col. Vladislav Seleznev, a Ukrainian military spokesman, said late Monday that the border guards, with help from Ukrainian special forces and the air force, had fended off the assault. It was unclear whether the rebel contingent had been defeated or was regrouping for another push.

Ukrainian officials fear that a defeat at the command center in the eastern region of Luhansk will open the gates to a flood of new militants. “If they capture that building, they control all the posts along the border” in Luhansk, said Oleg Slobodyan, a spokesman for Ukraine’s border patrol.

Monday’s battle again focused attention on Russia’s role, with U.S. officials accusing Moscow of helping to orchestrate the violence.

“It’s a further example of the destabilizing activities supported by Russia in the east, and it’s something we strongly condemn,” said Derek Chollet, assistant secretary of defense for international security affairs, who was in Kiev meeting with senior Ukrainian officials.

The United States has provided $18 million in nonlethal military assistance to Ukraine, including ready-to-eat meals, basic field supplies and tents. Chollet said that the Ukrainians provided a “long list” of needs and that the United States is interested in providing more assistance to the border service and the military.

But any increase in aid risks further antagonizing Russia.

Russian Foreign Minister Sergei Lavrov told reporters in Moscow that Ukraine’s government was targeting innocent people. “People die every day, and civilians suffer increasingly. The army, combat aviation and heavy weapons continue to be used against them,” Lavrov said, according to Russia’s Interfax news agency.

On Monday, however, it was the separatists who appeared to be endangering civilians. Although insurgents have mounted large-scale attacks on border posts in recent days, they have generally done so in remote areas.

Monday’s attack unfolded in a residential neighborhood, with rebels firing from the upper floors of an apartment tower, according to Ukrainian security officials. Footage captured by Russian television reporters showed civilians racing for cover past a playground amid a barrage of gunfire.

The target was the border command center for Luhansk, one of two areas where separatists last month declared “sovereign” republics. The center is set back several miles from the border, on the outskirts of the city of Luhansk.

At least 10 border service officers were injured, said Seleznev, the military spokesman. He did not have an up-to-date figure for rebel casualties, although Slobodyan had said that five were killed as of midday.

At one point, Ukrainian fighter jets destroyed two mortar positions manned by militants, according to Seleznev.

The deployment of the fighter jets later became a source of intense debate when an earth-shaking explosion struck the heart of Luhansk city, a regional center that’s home to half a million people.

Rebels initially said the blast was caused by an airstrike. But Ukrainian security officials said the separatists had fired a heat-seeking missile at a jet and inadvertently struck their own headquarters, the occupied regional administration building.

The explosion killed at least two people, including the separatists’ self-appointed health minister.

The conflict between government forces and pro-Russian insurgents has escalated sharply since Ukraine’s May 25 presidential and mayoral elections, in which Petro Poroshenko, one of the country’s richest men, won the presidency convincingly in the first round. Rebels disrupted voting in the southeast of the country, where polling largely did not take place.

Even as Monday’s battle raged, Russia’s Energy Ministry confirmed that it had received $786.4 million from Ukraine’s Naftogaz for gas deliveries and would give Kiev another week to pay the remaining $1.4 billion that Russia says Ukraine owes. If that doesn’t happen, Russia has threatened to cut off natural gas supplies — yet another lever Moscow can pull in pressuring its struggling western neighbor.

Poroshenko, 48, a billionaire who made his fortune in the confectionery business, has promised to crush the separatists, who have seized government buildings in the country’s east. But the president-elect has also said that he wants to talk to Russia, which he called crucial to any peace in the region. At the same time, he has promised closer ties with the West. How he might accomplish all three is not clear.

On Monday, rebels also tightened their grip here in the regional capital of Donetsk, with a dozen armed insurgents showing up at the offices of two local newspapers and whisking the editors to the insurgent-occupied administration building.

The editors were released an hour later and said they were treated well. But the message of intimidation was clear. Both Donbass and the other newspaper involved, Vecherniy Donetsk, had reported in recent weeks on pro-Ukrainian demonstrations.

“It’s psychological pressure, not physical,” said a grim-faced Andrey Krivcun, deputy editor of Donbass and one of those who was briefly detained. “They’re saying that if you don’t change your politics, you will have problems.”

Tuesday’s edition, he said, would be “the last for Donbass as we’ve known it.”

Morello reported from Kiev. Abigail Hauslohner in Moscow, Daniela Deane in London and Alex Ryabchyn in Kiev contributed to this report.