A Brunswick police officer accused of sending pictures of his genitals to an undercover federal agent posing as a 13-year-old girl was arrested Tuesday on a charge of attempting to transfer obscene material to a minor.

Garrett G. Brosnan, 25, of Bath, made an initial appearance in U.S. District Court in Portland Wednesday afternoon. He was released on $10,000 unsecured bond and ordered to live with his parents and not to have any unsupervised contact with anyone under 18.

Brunswick police issued a statement Wednesday saying Brosnan had been placed on paid administrative leave, pending an internal investigation.

“The allegations, if true, are extremely concerning, disappointing, and are not in accordance with the high moral standards that I expect of my officers,” Chief Richard Rizzo said in the statement.

Federal authorities began investigating Brosnan after the parents of a 13-year-old girl in Arizona complained to police that a person had engaged in an online conversation that was sexual in nature with their 13-year-old daughter in October 2015. According to an affidavit filed in support of the charges, authorities traced those communications to Brosnan. Authorities allege that in May he began having conversations with a Homeland Security agent posing as a 13-year-old girl.

The undercover agent and Brosnan engaged in sexual conversations online, and on June 2 and June 7, Brosnan sent the agent a picture of his genitals and several short videos in which he winks, blows kisses and asks for pictures in return, the affidavit says.

Using search warrants, agents said they identified the messages and videos as coming from online accounts registered to Brosnan, the affidavit alleges.

Authorities obtained a warrant for Brosnan’s arrest, which remained sealed until he was taken into custody Tuesday.

Rizzo said his department was unaware that Brosnan was being investigated until Homeland Security agents called and said they had an arrest warrant and wanted help in setting up Brosnan’s arrest.

Officials called Brosnan, who is not married, at home and told him they wanted to speak to him. They asked him to come to the police department, where he was taken into custody, Rizzo said.

“There are officers that are very good friends with Officer Brosnan. They are disappointed. They surely feel betrayed,” Rizzo said.

Brosnan has had no other complaints lodged against him since joining the department in August 2013, Rizzo said. Brosnan has been working the 8:30 p.m. to 6:30 a.m. shift as a patrol officer.

The Brunswick department conducts background checks on all new hires and no problems turned up when Brosnan was hired.

“We have an extensive background investigation on all our officers,” Rizzo said. “We go to their homes. We visit their neighbors. We do a high-intensity polygraph. We do a psychological (test). Nothing came up in his background.”

Rizzo said that after the department’s internal investigation is complete, he will hold a hearing and then could take a number of possible actions, ranging from reinstating Brosnan to active duty to termination.

He said internal investigations generally take no more than 30 days, and findings are based on a preponderance of evidence.

Staff Writer Eric Russell contributed to this report.