Even in the most desperate times, music can lift the spirits -- as some Italian neighbours have proven by singing together in harmony from behind closed doors.

Residents in Siena, a city in Tuscany, leaned out of their windows and broke into song on Thursday evening in a moment captured in a video posted on Twitter.

The video, which has been liked over 77,000 times and shared more than 23,000 times, was taken by a local who said they were singing to "warm their hearts" during the quarantine.

Italy is in the midst of a lockdown after the government implemented strict isolation measures to contain the spread of coronavirus, which has so far claimed more than 1,000 lives and infected more than 15,000 people in the country.

"People of my hometown #Siena sing a popular song from their houses along an empty street to warm their hearts during the Italian #Covid_19 #lockdown," the resident said in a tweet.

The video shows a dimly lit and deserted street and features the voices of men and women singing "Il Canto della Verbena" ("The Song of Verbena") -- a traditional patriotic folk song.

Italian Susy Unica Silvestri posted a separate video on Facebook on Thursday from her flat in Naples, which has been shared more than 13,000 times.

Her video shows people in neighboring blocks on their balconies, singing and chanting upbeat messages such as "go Italy, go Naples!" and "there is no virus that can beat us."

Silvestri told CNN the community planned to sing again on Friday evening -- and that despite the gravity of the situation, it was in the nature of Italians to remain upbeat.

"We are worried, but optimistic. The Neapolitan people love each other even with a choir from the balconies," she said.

"Tonight we will all do it again and we will thank the volunteer nurses and doctors who are helping us," she added.

"There is trust and optimism in the air... it could not be otherwise, we are Neapolitan, we are optimistic by nature."