A 20-year-old man is facing child pornography charges after police searched a home in New Glasgow, N.S.

Police say they were directed to the home after a social media application alerted law enforcement that child pornography was being shared through its service.

Members of the RCMP and the New Glasgow Regional Police responded to the home on Wednesday.

While officers were arresting the man, police say he reached for what appeared to be a handgun under a desk.

Police say the officers were able to control the man and safely remove the weapon from him. They later determined the firearm was a replica.

One police officer and the suspect sustained minor injuries but they didn’t need medical attention.

Nicholas Linthorne is facing charges of transmitting child pornography, possession of child pornography, resisting arrest, possession of a weapon for a dangerous purpose, using an imitation firearm while committing the indictable offence of resisting arrest, and assaulting a peace officer with a weapon.

Linthorne has been remanded into custody until his next court appearance on Feb. 5.