Ukraine's president called an emergency meeting of his military officials and cut short a trip to Saudi Arabia to rush back to coordinate the government's response.
The rocket attacks came a day after the rebels rejected a peace deal and announced they were going on a multi-prong offensive against the government in Kiev to vastly increase their territory. The rebel stance has upended European attempts to mediate an end to the fighting in eastern Ukraine, which the U.N. says has killed nearly 5,100 people since April.
Mariupol, which lies on the Azov Sea, is the major city between mainland Russia and the Russia-annexed Crimean Peninsula. Heavy fighting in the region in the fall raised fears that Russian-backed separatist forces would try to take over the government-held city to establish a land link between Russia and Crimea.
The RIA Novosti news agency cited Ukrainian rebel leader Alexander Zakharchenko as saying Saturday that an offensive had begun on Mariupol. He spoke as he laid a wreath where at least eight civilians died when a bus stop was shelled in Donetsk, the largest rebel-held city in eastern Ukraine.
Rebel forces have positions within 10 kilometers (six miles) from Mariupol's eastern outskirts.
Ukraine's Defense Ministry said there were three separate strikes from Grad multiple-rocket launchers Saturday on Mariupol and surrounding areas.
"The area that came under attack was massive," Mariupol mayor Yuriy Khotlubei said. "The shelling was carried out by militants. This is very clearly Russian aggression that has caused terrible losses for the residents of the eastern part of our city."
By the evening, Khotlubei said the death toll had risen to 29. There was no immediate report of how many people died in each location.
A Ukrainian military checkpoint on a road out of the city toward rebel-held areas was also hit and one serviceman was killed, the Defense Ministry said.
Mariupol city council urged residents not to panic and to ignore rumors that Ukrainian armed forces were planning to withdraw.
"On the contrary, all units are on fully battle-ready. Security measures in the city have been strengthened," the council said in a statement, adding that no armed separatist units had been seen moving toward the city.
Clashes were also taking place across the eastern regions of Donetsk and Luhansk, where a separatist insurgency emerged in April.
Fighting has also been intensifying recently for the government-held town of Debaltseve, 50 kilometers (31 miles) east of Donetsk. Main roads into the town are under separatist control and it's feared the Ukrainian forces stationed there could soon be fully surrounded.
Responding to the attack upon Mariupol, EU foreign affairs chief Federica Mogherini urged Russia to use its influence over the separatist leaders to halt their offensive and to desist from providing military and financial support.
Russia insists it does not support the rebels, but Western military officials say the sheer number of heavy weapons under rebel control belies that claim.
An AP reporter saw convoys of pristine heavy weapons heading into rebel territory this week.
A peace deal signed in September in the Belarusian capital of Minsk envisaged a cease-fire and a pullout of heavy weapons from a division line in eastern Ukraine. It has been repeatedly violated by both sides, and heavy artillery and rocket barrages have increased the civilian death toll in the last few weeks.
The foreign ministers from Russia, Ukraine, France and Germany agreed Wednesday to revive that division line, but fighting has continued unabated.
On Thursday, mortars rained down on Donetsk, hitting a bus and killing several bystanders. Rebel officials said 13 were killed in that attack. Monitors from the Organization for Security and Cooperation in Europe cited city morgue officials as saying eight bodies were received.
On Jan. 13, a bus parked near an army checkpoint north of Mariupol was hit by a shell, killing 13 people. Ukraine blamed the rocket attack on separatists.
The OSCE's special monitoring mission in eastern Ukraine on Saturday condemned the growing number of civilian casualties and called for restraint from all sides.
Raf Casert in Brussels and Yuras Karmanau in Kiev, Ukraine, contributed to this report.
Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.