Police rescued a dog in distress after two men allegedly left the dog in a car while they were out drinking.

Officers responded to the Tap City Grill in Hyannis, Massachusetts, early Monday morning. The officers had received a report that two men, 29-year-old Justin Wagner and 27-year-old Matthew Bernier, were drunk and refusing to leave. Police say Wagner and Bernier then decided to take a cab to Falmouth.

Just past 1 a.m., Wagner and Bernier called police to report that their truck had been stolen. When officers arrived, they say the two suspects were intoxicated and that Bernier was "belligerent and uncooperative."

After an investigation, police say it was determined that the truck had not been stolen, but Wagner and Bernier had forgotten where they parked it.

Police say they soon discovered that the two men had left a puppy in their car while they went drinking, according to MyFoxBoston. The puppy was left in the vehicle at 5 p.m. on Sunday and was not taken out until 3 a.m. on Monday morning. Officials say the windows weren't open and the dog was in distress.

The German Shepherd puppy was in a homemade kennel that consisted of a box and a blue tarp in the truck cab. Officers gave the puppy several bottles of water and cared for her in the police station until the morning.

The puppy was nicknamed "Midnight" by officers.

Wagner and Bernier were charged with animal cruelty and "Midnight" was turned over to animal control.