german shepherd
In this representative image, a German shepherd police dog digs in the dirt during a drug detection training with Palestinian anti-drug police in Gaza city, Dec. 16, 2014. Getty Images

A 2-year-old German Shepherd is being hailed a hero and a “four-legged angel” after he was reportedly shot three times while trying to protect his owner during a daytime home invasion Wednesday. Rex was protecting his 16-year-old master when he was shot, and now the owner’s family is trying to raise $10,000 to pay for his vet bills.

Rex was scheduled to undergo a surgery Friday to fix a fractured tibia, but it was not clear whether the surgery took place. The German Shepherd was shot in both hind legs during the home invasion.

Just before 12:30 p.m. EST on Wednesday, the 16-year-old said he was at home when he heard noises outside. Rex began to bark, and then the boy heard glass break.

“I started hearing barking, a lot of barking, and then one of the guys screamed, 'Get the dog! The dog bit me, the dog bit me!'" Mercado told Fox News.

The intruders reportedly entered the house by smashing the sliding glass door, Des Moines Commander Doug Jenkins said.

The boy said he hid in a closet and dialed 911. Meanwhile, a barking Rex ran downstairs to confront the intruders. Then the boy heard gunshots.

Immediately, Rex cried out after being hit with a bullet that reportedly went into his neck, while others struck his hind legs, and then he stopped barking. The intruders reportedly left when they heard police sirens nearby.

“I just want to thank my dog,” Mercado told Fox News. “If it wasn’t for him, I feel like I wouldn’t be standing here right now.”

Des Moines police came to the scene soon after the dog was shot. The teen, still on the phone with 911, told an operator he could still hear noises in the home. Des Moines police had to be cautious while entering the home thinking the armed intruders might be hidden somewhere. When officers went to rescue the boy, they saw the German Shepherd and assumed he was dead.

In this representational image, Rumor the German Shepherd poses for photos after winning Best In Show at the Westminster Kennel Club Dog Show at Madison Square Garden in New York City, Feb. 14, 2017. Getty Images

After the boy was rescued and safe, the SWAT team investigated the house looking for the intruders. They did not find anyone; however, they figured Rex was still alive. A Des Moines animal control officer, who was present at the scene, took the dog to the BluePearl emergency vet in Renton.

“Rex is an angel,” Julia Cadena, Mercado’s mother said. “He’s my four-legged angel that we had at our house.”

The dog was shot thrice, but was in stable condition at BluePearl, according to a spokesman. However, his recovery will cost the family a lot of money.

Susy Cadena, the 16-year-old boy's aunt, set up a GoFundMe fundraiser for the dog and by Thursday afternoon, the fundraiser had already topped its $10,000 goal.

BluePearl spokesman Curtis Krueger stated Rex was shot in the neck. The animal was also said to have wounds from a projectile on each of his hind legs. Rex was already treated for shock and his wounds.

"My nephew was protected by his eternal friend until the last bit of strength he had in him to do what his unconditional, loving instinct told him to," Cadena wrote on the fundraiser page. "Rex's life depends on a surgery he will need to survive."

Police haven't made any arrest in the case yet and it was also unclear why the house was targeted.