A 60-something couple in Palo Alto got an unpleasant surprise on Sunday when they woke up in the middle of the night to find a masked intruder in their bedroom. He said he wanted to use the couple's Wi-Fi network.

The burglar didn't get the Wi-Fi password he was looking for, however. The man leaped out of bed and confronted the intruder, shoving him down the hallway and out the front door. He then immediately called the police. The troublemaker was arrested by police minutes later. No one was injured in the confrontation.

Palo Alto police declined to name the 17-year-old suspect because he was a minor. He was arrested for burglary—a felony—as well as misdemeanor charges of prowling. He was also arrested for providing false information to a police officer—according to police, he initially lied about his identity when he was apprehended.

The intruder had gotten into the house by "cutting a screen covering an open window in the side yard," according to a police statement.

Remarkably, this wasn't the suspect's only legally dubious attempt to get Wi-Fi access that weekend. Just before midnight the previous night, police say, the same young man was found prowling around outside another Palo Alto home. When the house's residents came out and confronted him, he "asked to use their Wi-Fi network because he was out of data."

They told him to get lost, and he rode away on a bike that turned out to be stolen from their back yard. Police were able to recover the bike from the suspect following the second burglary, and he may face an additional charge for stealing the bike.