A North Carolina state judge was arrested Wednesday on charges he tried to bribe an FBI officer to gather text messages between two phone numbers in what the judge said was a family matter.

Superior Court Judge Arnold Jones II, who hears cases in three rural eastern North Carolina counties, appeared at an initial federal court hearing Wednesday.

Jones faces a maximum of 37 years in federal prison if convicted of all charges, prosecutors said. Jones was charged with paying a bribe to a public official, paying a gratuity to a public official, and corruptly attempting to influence an official proceeding.

The offers included cash and "a couple cases of beer," the News & Observer reports. It's illegal for law officers like an FBI agent to demand text or phone information from a phone company without an approved search warrant in an active case.

Jones is the chairman of the North Carolina Innocence Inquiry Commission, the first state-run agency in the country dedicated to proving a convicted person's innocence. His judicial district covers Wayne, Lenoir and Greene counties.

Jones approached the unnamed FBI officer a month ago and the two met in Goldsboro on Tuesday to exchange $100 for a disk supposedly containing the data, prosecutors said in a statement.

An indictment filed in federal court said Jones wanted copies of text messages between two phones made secretly.

"This involved family so I don't want anyone to know," the indictment quotes Jones as saying.

The FBI officer told Jones he asked a federal magistrate and was approved for a search warrant to get the text messages, the indictment said.

The judge's only comments Wednesday were answers to a federal magistrate's questions. The magistrate ordered Jones to surrender his passport and restrict his travel to within the state.

Jones was a private attorney in Goldsboro for 18 years before being elected to the Superior Court in 2008. He earned degrees from the University of North Carolina at Chapel Hill and the Wake Forest University law school.

The Associated Press contributed to this report.