An intruder who killed a maid during a botched raid at a Dubai villa has been sentenced to life behind bars.

The Pakistani man bludgeoned the Filipino woman to death with a metal bar when she spotted him in her room after he had sneaked into the property through an open door.

The 22-year-old then struck the family's dog with the weapon after it barked at him as he tried to make his escape.

The villa's owner returned to the home later in the day to find the maid dead and his pet badly injured.

The horrific incident occurred at about 4pm on March 9 of last year in The Villa residential community in Dubailand.

“My wife and I were outside playing golf while our son and the maid were at the house,” said the 59-year-old homeowner, who called police to report the murder.

The attacker was later arrested and confessed to the brutal crime during police questioning.

He said he knew the layout of the villa as he had previously been contracted to carry out construction work there by a former employer.

He said he had gone to the villa seeking work after being dismissed from his previous position.

But after seeing the maid leave the home to walk the dog, he decided to go inside with the intent to steal cash and valuables.

"She returned suddenly so I hid behind her bedroom door," the man said during questioning.

"When she turned around and saw me, I panicked and picked up a metal bar then hit her on the back of her head.”

He said he struck the dog as he feared its barking would alert people to his crime.

Prosecutors said he fled to a secluded area to throw away the murder weapon.

It was not made clear in court how he was identified.

He was convicted of premeditated murder, assault on a pet, attempted theft and trespassing at Dubai Criminal Court.

He will deported after serving his life sentence, a term of 25 years.