Updated

After hiding under a mattress to avoid the deadly terrorist attack at a natural gas plant in Algeria, a Puerto Rican gas worker has finally returned home.

On Tuesday, a government official said Wilmer Lebron Ayala had safely returned to the island.

Ayala is one of seven U.S. citizens who escaped being killed by Islamic militants during a four-day battle last week. At least 37 hostages and 29 militants were killed, while five foreign workers are still missing, authorities said.

The 46-year-old Puerto Rican native hid from the terrorists for more than three days, said Hiram Vega, spokesman for the city of Sabana Grande, where Lebron's family lives.

A family member, who did not want to be identified for security reasons, said Lebron survived by huddling under a mattress he had thrown on the floor of the dormitory where he was staying.

More On This...

He remained under the mattress without water or bathroom breaks, enduring an intense heat and eating only a couple of snacks he had earlier brought to the dormitory, the relative said.

The family member said Lebron told him that he owes his life to the plant's security guard.

"(Lebron) said he thanks God first and then the guard, who before being executed activated the terrorism alarm," the relative said.

When the alarm went off, Lebron and his colleagues deactivated the lights, the relative said.

Lebron, who had served in the U.S. military for nine years, pushed a locker against his door and hid under the mattress, Vega said.

"He prepared for the worst," Vega said, adding that Lebron heard the unrelenting sound of machine guns and explosions for several hours. When the attack began, Lebron received a text message from his boss who was not at the site warning him to gather food and water and brace himself for a drawn-out battle.

Lebron told friends and family that he kept hearing the terrorists demand the location of "the Americans."

After a couple of days, the explosions stopped and Lebron heard someone at the door telling him that it was safe to come out, said Vega, who met Tuesday with Lebron.

When he was finally rescued, Lebron was taken to Germany, where the FBI clothed him, fed him and took him to a hospital for an evaluation, the relative said.

Lebron arrived in Puerto Rico on Monday and was greeted by his wife, his mother and other family members, along with a group of government workers from Sabana Grande, said Vega, who also is a friend of Lebron's wife.

The relative, who was among those greeting Lebron at the airport, said the man is physically healthy but that the attack left him shook up.

"I saw him a bit disoriented. His eyes were really big," he said. "Even at the airport he kept looking up, to the sides. I felt he was scared."

Vega said the FBI took Lebron to an undisclosed location and ordered him and his family to not talk to the media for security reasons.

Secretary of State David Bernier said Lebron and his family are trying to recover from last week's ordeal.

"He just wants to rest and let time go by so he can little by little recuperate emotionally," Bernier said.

Lebron was working at the Ain Amenas gas plant in the Sahara Desert, which militants stormed last Wednesday in a battle that involved exploding cars and helicopter attacks.

The Pentagon has said there are strong indications that al-Qaida's North Africa affiliate, AQIM, had "a hand" in the assault.

Based on reporting by the Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino