A former Oklahoma senator and senior member of Donald Trump’s campaign team in the state has agreed to plead guilty to a child sex trafficking charge.

Ralph Shortey, 35, was arrested in March this year when police found him in a motel room with a 17-year-old boy.

The former Republican senator, who campaigned on a “family values” platform and reportedly voted for bills that targeted the LGBT community, has agreed to the guilty plea in exchange for the dropping of three other charges – two of child pornography and one of the production of child pornography.

Officers reported a “strong odour of marijuana” coming from the motel room where Mr Shortey was discovered with an open box of condoms in his backpack.

The married father-of-four had exchanged messages with the teenager via the Kik app, during which Mr Shortey offered the boy money in exchange for “sexual stuff”.

The two counts of child pornography were connected to allegations he used a smartphone to send videos of young boys and one of a “prepubescent girl” to an email address in 2013, KocoNews5 reports.

The third charge is connected to an allegation that he persuaded someone under age to send him at least one inappropriate picture.

Defence attorney Ed Blau, who is acting for the former senator, said: “Mr Shortey feels this is a necessary step in putting this painful and humiliating ordeal behind him, both for himself, his family and for the state of Oklahoma,” NewsOK.com reported.

His sentencing is to be scheduled for a later date, though the minimum penalty for child sex trafficking in the state is 10 years in prison, the site reports.

Mr Shortey, who is married with four daughters, was first elected to the senate in 2010 and later became part of the leadership team for the president’s campaign in Oklahoma.