An Indiana man wound up behind bars after deputies responded to his accidental 911 call, investigators said.

Aaron Allman, 48, of Columbus, ended up getting locked up on an outstanding warrant Friday night after he called the Bartholomew County Sheriff's Office's emergency number by mistake.

“Thank you, Mr. Allman, for giving us a call to pick you up,” Sheriff Matt Myers wrote in a Facebook post Saturday. “Doesn't get any better than this. Lock your cell phone when not using.”

INDIANA POLICE SAY MAN'S PAPER LICENSE PLATE IN CRAYON LED TO CAR THEFT ARREST

Myers said after he made the 911 call, Allman told dispatchers he'd called accidentally and that everything was fine, no one needed to respond.

CLICK HERE FOR THE FOX NEWS APP

“Deputies responded anyway where they were able to confirm that Allman had a warrant for his arrest,” Myers said.

The deputies then gave Allman a ride to the Bartholomew jail.