Image copyright Reuters Image caption Lin-Manuel Miranda has family in Puerto Rico

A group of music stars have come together to create a song in aid of relief efforts for the hurricane-battered island of Puerto Rico.

Almost Like Praying has been written by Lin-Manuel Miranda, musical creator of the hit Broadway show Hamilton.

Stars who have taken part include Gloria Estefan, Rita Moreno, Jennifer Lopez and Despacito singer Luis Fonsi.

Hurricane Maria devastated Puerto Rico with high winds and heavy rain and much of the island remains without power.

Mr Miranda's parents are from the US territory. He said the song's inspiration came from his own efforts to contact loved ones after the storm, and also by the slow pace of relief efforts.

"I thought I could work all 78 towns in Puerto Rico into the lyrics of this song and if we did our job right, these towns will never be forgotten again," he told Billboard magazine.

Image copyright Getty Images Image caption Thousands of people in Puerto Rico lost their homes to Hurricane Maria

Almost Like Praying mixes Spanish and English lyrics and takes its tune from elements of the song Maria from the hit musical West Side Story. A video of the recording has been released on YouTube.

Mr Miranda has been a strong critic of the US government's relief efforts.

"I think it's been well documented that it's been slow and it's been insufficient, commensurate to the challenge ahead," he told Billboard.

All proceeds from the song will go to the Hispanic Federation's Unidos Disaster Relief Fund for Puerto Rico.