Missouri law enforcement was able to “sniff out” the location of a person wanted for a controlled substance over the weekend after the suspect passed gas so loudly that it gave up his or her hiding spot, officials said.

The Clay County Sherriff’s department posted on Facebook to share how flatulence played a role in the arrest outside the City of Liberty, Mo.

TEXAS BOY WHO WENT VIRAL FOR TYING HONOR GUARD MEMBER'S SHOE WANTS TO BE POLICE OFFICER

“If you’ve got a felony warrant for your arrest, the cops are looking for you and you pass gas so loud it gives up your hiding spot, you’re definitely having a 💩 day. 🚓 #ItHappened,” the sheriff’s office said. The department posted a photo of officers using police dogs in a wooded area as part of their search.

Officials have not released a name for the suspect or provided more information about the case.

“We’ve gotta give props to Liberty PD for using their senses to sniff him out!” the sheriff’s department told St. Louis’ Fox 2 after the station reached out for more information about the case.

The Liberty City Police Department was ‘surprised’ to see the incident ‘slip out, which stinks for the arrestee,” the City of Liberty said on Twitter. The city also gave props to officers for "airing out a wanted person's dirty laundry and fanning the flames."

CLICK HERE TO GET THE FOX NEWS APP

No one was injured in the arrest, the city said.