On Friday the judge modified the protective order which had prevented Mirkarimi from harassing or assaulting his wife.
Lopez crossed her fingers as she walked into the courtroom with her lawyer. Minutes later her husband and his lawyers arrived, hopeful the two could finally reunite.
"I miss my family terribly," Mirkarimi said. "I want to rebuild and I believe so does my wife."
The suspended sheriff had been ordered to attend parental counseling and domestic violence classes after he pleaded guilty to a reduced domestic violence charge of misdemeanor false imprisonment.
A probation officer told Judge Garrett Wong that Mirkarimi had good marks in his classes and did he not object to lifting the court order.
While she was under oath, prosecutor Liz Aquillar Tarchi asked Lopez questions about whether she would feel safe for herself and their 2-year-old son Theo if the stay away order was lifted. Lopez answered yes and Wong then revoked his order.
"The best of this is that Theo is going to have his parents together," Lopez said. "That is the best thing."
Her husband added, "This has been beyond cruel and punishing. This isn't something that any one of us asked for."
Mirkarimi still stands the possibility of losing his job as sheriff.
Lopez testified Thursday night at the ethics commission hearing. She was resolute in her loyalty to her husband.
Mirkarimi said that the judge's decision to lift the ruling was a happy break in his long nightmare.
Lopez is heading back to Venezuela to care for her ailing father and work on a movie.
The ethics commission meets in August to wrap up its deliberations. Then the supervisors will vote on whether Mirkarimi still has a job.
The couple's son Theo remains in Venezuela.