Italian emergency workers are continuing to search the rubble of collapsed buildings in the town of Casamicciola after the popular tourist island of Ischia was hit by an earthquake, killing at least two people and injuring dozens.

Ischia earthquake Italy
Italian emergency workers, firemen and police officers search through rubble of a collapsed house in Ischia Eliano Imperato/AFP

Rescuers found a baby boy called Pasquale in the wreckage and pulled him out alive in his nappy seven hours after the quake. There was a hush followed by loud applause. Fire crews found his brothers Mattia and Ciro, aged seven and 11, stuck under a bed nearby. They kept talking to them and fed water to them through a tube, then managed to pull Mattia free.

By noon local time, emergency crews said they had freed Ciro's legs and were working to release him. "I promised them that after this was all over we would all go get a pizza together," one emergency worker said on Italian television. About an hour later, rescue workers managed to free Ciro.

The father told RAI state television that the boys were in their bedroom when the quake struck, while he and his wife were elsewhere in the house. She managed to escape through a window while rescuers got first to the father.

The director of the island's hospital said two people were killed and about 40 injured. One of victims was killed when she was hit by falling masonry from the church of Santa Maria del Suffragio, the Civil Protection Department in Rome said. The church was rebuilt after it, like most of Casamicciola was destroyed by an earthquake that killed some 2,000 people in 1883.

Ischia earthquake Italy
Ischia earthquake Italy
The ruins of the Church of Santa Maria del Suffragio in Casamicciola, where a woman was killed during the earthquake

The quake hit a few days before the first anniversary of a major quake that killed nearly 300 people in central Italy, most of them in the town of Amatrice.

Italy's National Institute of Geophysics and Vulcanology put the magnitude of Monday's quake at 4.0, revising it up from an initial 3.6, but both the US Geological Survey and the European quake agency estimated the magnitude at 4.3.

Residents and tourists on the island off the coast of Naples ran out onto the narrow streets from homes and hotels. Fearing aftershocks, many decided to leave the island early.

The island has a year-round population of about 63,000, which swells to more than 200,000 in summer, with many people from the mainland owning holiday homes. Three extra ferries were provided during the night for about 1,000 residents and tourists who wanted to leave.

As daylight broke, dozens of people went to the island's four ports, having decided to end their holidays early. Many who were due to take ferries from Naples on the mainland to start their holidays cancelled their plans, local officials said.

Ischia, a volcanic island about a one-hour ferry ride from Naples, is popular with German tourists. German chancellor Angela Merkel has stayed there often.