The Texas man behind a company selling plans for 3D-printed guns was sentenced Thursday to seven years' probation for having sex with an underage girl.

Cody Wilson, 31, pleaded guilty in August to injury to a child after initially facing sexual assault charges. In addition to probation, he must register as a sex offender, undergo counseling and perform 475 hours of community service.

3D-PRINTED GUN BAN EXTENDED BY JUDGE PENDING STATE CHALLENGE

He will not be allowed to own a firearm while on probation. The teenage girl and her family agreed to the lesser charge, prosecutors said.

The girl said she met Wilson on SugarDaddyMeet.com and eventually went with him to a hotel in Austin. There they had sex. She said she was paid $500.

Wilson was arrested in Taiwan last year after missing a flight back to the U.S. to face the charges. He founded Austin-based Defense Distributed, where he sold blueprints for untraceable 3D-printed guns.

CLICK HERE FOR THE FOX NEWS APP

The sales stirred the ire of gun-control advocates, who argued the weapons would pose security challenges during screenings at airports and other venues.

Wilson later defied a federal court order to stop posting the plans online. He resigned from the company after his arrest.

The Associated Press contributed to this report.