A man who police say broke into a West Valley elementary school had to undergo surgery Wednesday after being bitten on the ear by a police dog.

WEST VALLEY CITY — A man who police say broke into an elementary school had to undergo surgery Wednesday after being bitten on the ear by a police dog.

The incident happened about 1:45 a.m. at Pioneer Elementary School, 3860 S. 3380 West. An alarm was tripped indicating a possible break-in. The district's security system includes microphones in the building and allows the alarm company to listen, said Granite School District spokesman Ben Horsley.

"It was determined that it was an actual burglary. We could hear (the suspects) talking between each other," Horsley said.

Officers who were called to the school first cleared the main building and then started searching the portable classrooms. Police found two men hiding under a stack of desks, according to a Granite School District police report.

After the men ignored the officers' commands to surrender, Granite officers, with the assistance of West Valley police, sent a police K-9 into the portable classroom.

One man, Zane Walton, 26, suffered a severe bite to his ear by the dog that required surgery. Eliki Fonua, 18, was not injured. Both men were arrested. A third person, a woman, was later picked up by investigators. She is believed to be the getaway driver, Horsley said. Her name was not immediately available.

Investigators found a pile of school equipment in the center of the room, including computers, that the men were apparently getting ready to steal.

Utah state court records show Walton was sentenced to the Utah State Prison in 2011 on an attempted aggravated robbery conviction after he and another man robbed a third man at knife point. They also took the victim's ID so "if the cops were called they could come back and kill him," according to charging documents.

In 2010 he was convicted of an amended charge of attempting to possess another person's bank card. In 2007 he was convicted of failing to stop at the command of an officer, according to court records. In 2006, he was convicted of felony amended charges of attempted drug possession and attempted unlawful possession of a gun.

Twitter: DNewsCrimeTeam