Hurricane Willa swept onto Mexico's Pacific mainland with 195 km/h winds Tuesday night, hitting an area of beach towns, fishing villages and farms after roaring over an offshore penal colony.

The U.S. National Hurricane Center said the dangerous Category 3 storm hit near Isla del Bosque in Sinaloa state, about 80 kilometres southeast of Mazatlan, a tourist spot of high-rise hotels and about 500,000 people, many of them U.S. and Canadian expatriates.

Federal officials said there were early reports of power blackouts in some places and damage to flimsy structures with tin roofs.

The storm was moving inland at 17 km/h and was forecast to quickly begin losing power.

People took in a brilliant sunset in Mazatlan, as Willa approached. (Henry Romero/Reuters)

Although hotels, restaurants and stores were boarded over, people ventured onto Mazatlan's coastal boulevard to watch a spectacular sunset as the hurricane obscured the sky to the south.

Alberto Hernandez, a hotel worker in the town of Teacapan, close to where the storm made landfall, expressed confidence before it hit that the building would hold up. He and his son, who also works at the hotel, were staying on the job, though the rest of his family had left the area.

"We've had rain all day. There is nobody in the streets. Everything is closed," Hernandez said. "But not everyone wanted to leave, even though authorities made it clear that he who stays does so at his own peril."

Emergency officials said they did move more than 4,250 people to safer ground in coastal towns and set up 58 shelters ahead of the storm.

By mid-afternoon, Willa was already generating torrential rain. Forecasters expect the storm expected to dissipate over northern Mexico on Wednesday.

Here are the 3 PM MDT Key Messages for <a href="https://twitter.com/hashtag/Hurricane?src=hash&ref_src=twsrc%5Etfw">#Hurricane</a> <a href="https://twitter.com/hashtag/Willa?src=hash&ref_src=twsrc%5Etfw">#Willa</a>. The hurricane is expected to make landfall this evening. Full advisory: <a href="https://t.co/Oy8uoeRKme">https://t.co/Oy8uoeRKme</a> <a href="https://t.co/FX4CzZ1AE9">pic.twitter.com/FX4CzZ1AE9</a> —@NHC_Pacific

The storm battered the Islas Marias, a group of Mexican islands about 100 kilometres off the mainland that include a nature preserve and a federal prison. Federal authorities declined to comment on precautions taken at the prison, citing security concerns.

As Willa closed in, the beach in Mazatlan almost disappeared, with waves slamming against the coastal boulevard under looming black clouds. A few surfers took advantage of the high waves even as workers boarded up windows on hotels, shops and homes. Schools were closed and the streets nearly empty.

A restaurant in Mazatlan piled up sandbags along the beach ahead of Willa's landfall. (Daniel Slim/AFP/Getty Images)

Some families went to a Mazatlan convention centre, which opened its doors as a shelter. They spread out blankets along the walls and waited for the storm.

"The house we're living in is not well-built," said Sergio Ernesto Meri Franco, who rents a studio apartment.

'Extraordinary emergency'

The federal government issued a decree of "extraordinary emergency" for 19 municipalities in Nayarit and Sinaloa states.

Bob Swanson, who is from Saskatchewan and spends two to six months of the year in his house in the Cerritos neighbourhood near the shore in Mazatlan, said he filled his washing machine with water, filled his home fuel tank and gassed up his car in case he needs to head into the mountains for safety.

The government issued a decree of 'extraordinary emergency' for 19 municipalities along the Pacific coast. (Rashide Frias/AFP/Getty Images)

"I'm kind of waiting with bated breath," he said over the phone, adding that he was sitting on his porch and smoking a cigarette.

Hurricane-force winds extended 55 kilometres from Willa's centre, and tropical storm-force winds were felt up to 185 kilometres out.

Reminder <a href="https://twitter.com/hashtag/Mexico?src=hash&ref_src=twsrc%5Etfw">#Mexico</a>: avoid all travel to the southwestern coast of Mexico, between <a href="https://twitter.com/hashtag/SanBlas?src=hash&ref_src=twsrc%5Etfw">#SanBlas</a> and <a href="https://twitter.com/hashtag/Mazatlan?src=hash&ref_src=twsrc%5Etfw">#Mazatlan</a>, due to Hurricane <a href="https://twitter.com/hashtag/Willa?src=hash&ref_src=twsrc%5Etfw">#Willa</a>. Follow the instructions of local authorities. <a href="https://t.co/OJYcsGrW35">https://t.co/OJYcsGrW35</a> —@TravelGoC

Forecasters said the hurricane could bring 15 to 30 centimetres of rain — with up to 45 centimetres in some places — to parts of Jalisco, Nayarit and Sinaloa states, with flash flooding and landslides possible in mountainous areas.

Farther to the south, the remnants of tropical storm Vicente continued to bring heavy rain that caused deadly flooding and mudslides. Federal disaster agency chief Luis Felipe Puente said 11 people died as a result of Vicente. Local officials earlier put the figure at 12.