Hotel guests may lose confidence in the key cards given to them at the front desk after watching this video that exposes a major security flaw.

Calling it a ‘complete hotel key fail’, two travellers have recorded footage of themselves opening three adjacent rooms at a $38-a-night budget hotel in New Mexico.

The men said they used the same key card the open the rooms and got the idea after another guest mistakenly entered their room in the middle of the night.

Two travellers recorded footage of themselves opening three adjacent rooms at a $38-a-night budget hotel

In the clip, one of the men holds up a key card for the camera and uses it to open the room where they stayed

The man then goes to the adjacent room and uses the same key card to unlock that door

Their footage was posted on YouTube on Saturday and has already had more than a million views.

The men said they opened three rooms with a single key card during their stay at the Rodeway Inn in the city of Gallup, on Route 66 near New Mexico’s border with Arizona.

In the video, the man recording tells the camera: ‘Last night, we’re laying in bed and somebody decides just to walk right into our hotel room at 1:46, which we’re definitely assigned to.

‘We asked the hotel lady why this might have happened and she said, well, they gave the other people the master key.

‘So we did a little bit of research ourselves to see, well, what if they’re all master keys?’

The men said they opened multiple rooms with the same key card at a Rodeway Inn in New Mexico

The travellers said they got the idea after a guest walked into their room in the middle of the night

The man unlocks a third door with the same key card. The hotel's owner said the flaw has been addressed

As he narrates his friend holds up a key card, which indicates it is for room 146 on the ground floor, and proceeds to open the room.

The camera pans to show a view of the hotel and the friend walks into view again and opens rooms 145 and 144 with the same card.

The man who filmed the video says: ‘We’re at the Rodeway Inn in Gallup, New Mexico.’

His friend adds: ‘Where everybody has a key to everybody’s room.’

‘Where you’re all welcome,’ says the man filming.

The men wrote on YouTube that they stayed at the hotel during their 4,000-mile road trip to the Rubicon Trail in the Sierra Nevadas in California.

In a post on YouTube, Choice Hotels International, which owns the Rodeway Inn chain, said: 'Thank you for bringing this to our attention. We have contacted the hotel and determined that there was a malfunction in their key system.

'They have taken immediate action to address this.'

A spokeswoman for Choice Hotels later told MailOnline Travel that it has terminated the property's franchise licensing agreement following a review of the incident.

She said: 'The operator failed to uphold the high standards we place on guest safety and security, which is unacceptable.