SAN DIEGO (CBS 8) - As hot temperatures rose throughout San Diego, residents were reminded to keep their pets safe. Neighbors of one San Diego man called the police after they noticed he had left his dog inside a car for several hours.

The man said he left his dog inside the car outside the UCSD Medical Center, after he took his wife to the emergency room. He said he did not realize it would take so long.

Lucky, who is a mixed-breed dog, was agitated Wednesday after having spent several hours inside a car. He would bark every time someone would come near, and at one point, he crawled under the dashboard to try and find some relief from the hot sun.

Someone in the area noticed Lucky in the car, and reported it to the police.

When officers arrived, they discovered the windows were cracked, but the sunroof closed.

Because Lucky appeared agitated, according to the police who arrived at the scene, he was not let out, but one officer did put water in the car.

Another officer went and looked for the owner who was inside the emergency room.

Marion Rashid said he took his wife to the emergency room not knowing they would be there for several hours.

"I understand. We were suppose to be two to three hours less, but it happened, and I forgot he was there," he said.

Marion let Lucky out while apologizing to officers for the mistake, and thanked them.

Neighbors said it is not the first time they see a case like this, because hospital goers often do not know what to do with their pets.

"Sometimes they leave their dogs or like a bunch of kids in the car with the windows up," said Norman Ramos.

Rashid was not given a ticket, but police did give him a warning.