Some good news for a U.S. soldier whose home was demolished by Miami-Dade County while he was serving his country. A federal judge has ruled that Sgt. First Class Jesus Jimenez, who fought in Iraq and Afghanistan, can pursue damages against local authorities.

Vet Who Makes Furniture for Needy Families Could Face Fine

DOD Sends 'Pink Slip' Letters to Soldiers Fighting in Afghanistan

It all started in 2007 when Jimenez's home was found to be in violation of the building code due to exposed wires and a broken roof. The county took action against Jimenez, but he asked for the case to be delayed while he completed his active duty.

The house was eventually knocked down in 2011 while Jimenez was away training for his second deployment to Afghanistan.

His wife was five months pregnant at the time and many of the family's possessions were inside when the home was bulldozed.

Baby's Best Friend: Baby Pit Bull Cuddles With 10-Week-Old Girl

WATCH: Dog Passes Out After Being Reunited With Owner

Here's more on the legal proceedings from the Miami Herald:

A Miami federal judge ruled last week that Miami-Dade violated U.S. law by failing to grant Jimenez’s request. Jimenez, now a U.S. Army sergeant first class in Fort Bliss, Texas, will pursue damages against the county and two building officials to compensate for the loss of his family’s home and the hardship they suffered.

“I feel relieved,” said Jimenez, a 49-year-old father of four. “But whatever I recover won’t be enough to do much.”

In the hours the house at 1488 NW 103rd St. was being bulldozed, Jimenez was unreachable in California, preparing for his second Afghanistan deployment. His family hadn’t moved out, despite repeated orders to leave. And while they were able to take some of their belongings, they lost everything else.

“They didn’t care,” said Laura Jimenez, 32.

Miami-Dade officials wouldn’t comment, citing the ongoing litigation. But the county said in court filings that it gave the Jimenez family every opportunity over four years — including between Jesus Jimenez’s deployments, when he was back in the U.S. — to repair or knock down their house, which building inspectors deemed unsafe.

“It is my duty to remove individuals from structures which may cause a potential hazard to the safety and welfare of this family,” building chief Charlie Danger, who has since retired, wrote in November 2007. “This is why I cannot find a reasonable justification to allow the Jimenez family to continue to reside under these severe circumstances.”

Danger wrote the email the day before Jimenez’s case was to be reviewed by the county’s unsafe structures board. A day earlier, Jimenez’s commanding military officer had written the county asking to stay the hearing for 90 days: Jimenez, a combat engineer, he said, was in Iraq conducting training to defuse improvised explosive devices.

The officer cited the Servicemembers Civil Relief Act, a law originally passed during World War II and reinstated in 2003 that allows for the temporary suspension of judicial and administrative proceedings that may hurt active soldiers’ civil rights.

Miami-Dade argued the law didn’t apply because the county issued the violations while Jimenez was a reservist, more than a month before he was ordered into active duty. And because it took four years to demolish the house, the county noted Jimenez effectively received the stay he sought.

However, Jimenez was on active duty when he asked for the stay, and that is what matters, ruled U.S. District Judge Robert N. Scola Jr. The county and building officials named in the case — Danger and Building Code Support Division Director Ricardo Roig — “miss the point,” the judge wrote in his order granting summary judgment.

“While it is possible that the Jimenezes employed dilatory tactics to avoid remedying the violations on their property and complying with the applicable building ordinances, their behavior does not negate the Defendants’ failure to stay the proceedings for the requisite 90 days,” Scola wrote.

“Plaintiffs’ behavior was by no means perfect,” he added. “But by enforcing the [servicemembers act], this Court has vindicated a national policy of high priority.”

It’s unclear whether Miami-Dade plans to appeal. The violations were issued under former Mayor Carlos Alvarez. The house was demolished after Alvarez was ousted in a recall but before his successor, Carlos Gimenez, was elected. The Jimenez family filed the lawsuit a couple of months after Gimenez’s win.

Scola scheduled a September jury trial to decide how much the county will have to pay, but ordered the two sides to first try to negotiate a settlement.