Two dogs are definitely this man's best friends after courageously finding help when he became stuck knee deep in mud.

An 87-year-old man in Montgomery County, Maryland was playing with his two dogs on Monday evening when the incident occurred.

Around 2.30pm, the man went to retrieve a stick for his dogs at the edge of the Potomac River near Little Falls Dam when he became stuck knee deep in mud.

The man tried to wriggle himself free from the mud, but only pushed himself deeper into the sludge.

An 87-yea-old man became stuck knee deep in mud while playing with his two dogs

The dogs ran to a nearby trail and barked until they caught two cyclists attention

Montgomery County Fire Department Captain Eddie Russell told NBC Washington, 'You don't realize that when your shoe or feet become stuck, the more you move, the worse you're making it.'

Pete Piringer, the Chief Spokesperson for Montgomery County Fire and Rescue Service, told People that the two dogs raced to a nearby trail to find help.

They ended up at the C&O towpath, a 184 mile trail in Maryland that is popular with residents.

The Montgomery County Fire and Rescue Service crew arrived at the scene and freed the man

The man had been stuck the mud at the edge of the Potomac River before emergency crews found him

The two pooches began to bark for help, eventually grabbing the attention of two cyclists about 50 yards away.

Steve Shollenberger, one of the cyclists who found the man, believes the dogs coming to the trail is a reason they found the man.

'I'm probably not going to be looking at the Potomac. I'm going to be looking at the trail, especially right now because it has all kinds of debris on it,' Shollenberger told WTOP.

Rescue crews gave a demonstration of how the equipment they use can free people from mud and other situations.

Following the dog's desperate barks, the cyclists discovered the man and called rescue crews and stayed with him until authorities arrived.

By that time, the man had been stuck for an hour and was so deep into the mire that he couldn't even turn his body towards the C&O towpath to call for help.

Using technical rescue equipment, the Montgomery County Fire and Rescue was able to free the man from the mud.

In a video posted by Piringer, he shows the special rescue gear the service crew uses to free people from mud.

The materials allow rescuers to create a bubble that disrupts the mud's suction and allows the victim to free themselves.

The man was not injured.

Capt. Russell said, this truly is a good story from start to finish.'