A man who tried to smuggle in three Vietnamese nationals into the U.K. by using a small roof box on the top of his car was sentenced on Friday to three years in prison.

The U.K's Home Office said 35-year-old Robert Rooney tried to hide the three migrants, including a 15-year-old girl, from authorities when they were discovered in October at a border control check in France.

"Smuggling people into the UK in this way is incredibly dangerous and put the lives of the individuals at huge risk," Border Force Regional Director Dan Scully said in a statement. "Crammed into a confined space inside the roof box must have been terrifying. It's thanks to the vigilance of Border Force officers that they were discovered and that Rooney was caught."

THOUSANDS OF MIGRANTS MASS AT GREEK BORDER, MORE FLEE SYRIA

Photos released by the Home Office show how cramped the conditions were inside the box.

Officials said Rooney's vehicle was pulled over by Border Force officers and checked before he planned to cross into the U.K. from France on the Eurotunnel on Oct. 5, 2019.

When an officer had asked the 35-year-old to open the roof box, Rooney claimed he had lost the keys, Sky News reported.

Officers were able to partially pry open the roof box, where they discovered the three people inside who were in a "distressed" state.

UK STUDENTS TRAINED ON HOW TO DEAL WITH STAB WOUNDS AMID KNIFE CRIME EPIDEMIC

Rooney was immediately arrested after the discovery and later pleaded guilty to facilitating a breach of the UK's immigration laws.

On Friday, he was sentenced at Canterbury Crown Court to three years in prison.

CLICK HERE FOR THE FOX NEWS APP

Dave Fairclough, the deputy director of the UK's Immigration Enforcement’s Criminal and Financial Investigation team, said Ronney "deliberately placed three people in an extremely precarious situation" and was "prepared to turn a blind eye" to the risks.

"He has rightly been handed a custodial sentence," Fairclough said in a statement. "The message to the callous criminals engaged in immigration related criminality is clear - you will be caught and the consequences will be severe."

Last year, 39 people were found dead inside the back of a semi-truck near an English port

Authorities have warned for several years that people smugglers are turning to Dutch and Belgian ports because of increased security on the busiest trade route between Calais in France and Dover in England.

Britain's National Crime Agency warned in 2016 that people smuggling using containers on ferries was "the highest-priority organized immigration crime threat."

Fox News' Lucia Suarez and the Associated Press contributed to this report.