A Texas man was busted over a viral video of him smiling and shooting a semiautomatic weapon out of a moving vehicle, police said.

Jonathan Jay Oneal, 26, was seen in the clip grinning in the back seat as he fired an AK-47 pistol-style weapon several times as the car traveled down the highway in El Paso, the El Paso Times reported.

The footage was posted to social media then re-posted Saturday on Instagram by the El Paso gossip site “Fit Fam El Paso,” racking up thousands of views.

El Paso police said Sunday it was aware of the video and then called for the shooter to come forward.

“If you are the person in the video, or person taking the video, the smart thing to do now: 1. Walk in to any police station unarmed and speak to investigators. 2. Make it a lesson learned and move forward from there,” the department tweeted.

The next day, Oneal turned himself in to authorities and was arrested on charges of discharging a firearm.

Police said Oneal “did the right thing” and praised the public for their help securing an arrest.

“We are grateful that no one was injured and appreciate the efforts of everyone not willing to tolerate this type of behavior in our city,” police said. “Thank you for your willingness to step up to keep our community safe.”

Oneal was booked into the El Paso County Jail, where he was ordered held on a $50,000 bail, according to the newspaper.