Two men are in custody in the US state of Maryland on suspicion of trying to smuggle drugs and pornography into a prison with a drone, according to prison officials.

Synthetic marijuana and bootleg pornographic DVDs were among the items that the duo intended to fly into the state prison in Cumberland.

"You couldn't make this stuff up," Maryland's Secretary of Public Safety Stephen Moyer was quoted as telling local reporters.

The Maryland Department of Public Safety said in a statement that the two suspects were arrested on a road that runs by the Western Correctional Institution.

In their vehicle, officers found a quadracopter and its remote control flying console, as well as a handgun, the statement alleged.

Both men were being held in Cumberland on suspicion of plotting to use a drone to airlift contraband into a correctional facility.

An inmate suspected of participating in the foiled effort is also facing charges after a search of his prison cell turned up contraband, the statement said.

It was thought to be the first time in Maryland that smugglers have been caught using a drone to overfly a prison wall.

Earlier this month, a bid to airlift tobacco, marijuana and heroin into an Ohio prison using a drone triggered a melee among a number of inmates.

In July 2014, another drone bearing marijuana, tobacco and mobile phones crashed outside a wire fence that surrounds a maximum security facility in South Carolina.