Authorities said the pair arrived in a van that had been stolen in Bangor.
The staff at the South Portland detention center spotted the van parked outside around 6:00 p.m. and noticed one of the people inside was handling a gun.
Police responded and ended up arresting Brenden Fuller, 18, charging him with criminal display of a firearm and criminal trespassing.
A 17 year old was also taken into custody and is also charged with criminal threatening along with unauthorized use of a motor vehicle.
Police said the BB guns were very realistic and were made to look like real guns.
What the two young men were planning is still unclear.