FBI agent Rafael Hernandez first appeared in Salem in October 2008. He arrived to relay information to Sami and her witness protection guard. However, once he arrived, he found that Sami had given sleeping pills to her guard. When Sami's guard awoke, the guard resigned from her post and left Rafe to guard Sami.
Rafe and Sami butted heads in the beginning, but ultimately formed a friendly relationship. Rafe stayed fairly quiet about his personal life, but did mention that he spent a lot of time at the local convent when he was younger because he was a problem child. He also mentioned his mother, who taught him how to make tamales. Rafe was one of the few people who knew that Sami was pregnant while in witness protection. He also knew that E.J. was the father of Sami's baby, but went along with Sami's plan to hide Grace's paternity.
After the stint in witness protection was over, Rafe wasn't ready to leave Sami and Grace behind. He tried to apply for a job with the Salem PD and wanted to build a future with Sami. While the Salem PD could not hire him, he decided to stay in Salem anyway to be with Sami and Grace. While in Salem, he also reconnected with his estranged sister, Arianna.
Despite Arianna's protest against his relationship with Sami, Rafe moved forward with her. He asked if he could adopt Sami's baby, Grace, and Sami agreed. But, before the adoption could be legalized Grace died of bacterial meningitis. Rafe was crushed.
In the weeks following Grace's death, Sami noticed that Rafe was more distant. She started asking questions when she found Rafe visiting the grave of Emily Hudson. Rafe told Sami that Emily was his fiancée, who had tragically died on their wedding day. But, Rafe would not elaborate on much more of the story. Sami began to investigate Rafe. But she didn't get very far.
Emily's sister, Meredith, returned to Salem. In retaliation for her sister's death, Meredith kidnapped Rafe and held him captive in her parent's old house. She hit Rafe in the head with a brick and threw him into the river.
Luckily, Carly Manning fished Rafe out of the river and nursed him back to health. Rafe returned to Salem and began to investigate Nicole Walker, who he believed switched babies with Sami. He snuck DNA samples from Sydney and Sami and had them analyzed. When he learned that they were a match, he told Sami what Nicole had done. Sami got her daughter back.
Sami and Rafe's reunion with Sydney was short lived. A desperate Nicole kidnapped Sydney from the DiMera mansion and left Salem. While on the run, Anna DiMera caught up with Nicole and kidnapped Sydney from Nicole. Anna sent Sami ransom notes and instructed Sami not to involve the police. So, Sami kept the letters from Rafe and confided in E.J. When Rafe found out, he was upset and broke up with Sami.
Rafe continued to investigate Sydney's kidnapping, as he was not convinced that Anna was working alone. Rafe suspected that E.J. was behind the kidnapping and tried to get Anna to confess. When she refused, he looked for clues elsewhere. Luckily, one night he happened on Nicole and E.J. having a suspicious conversation on the pier. Rafe set his sights on Nicole.
Thanks to Victor, Rafe learned that the best way to get Nicole to trust him was to convince her that he was interested in her. So, Rafe met Nicole one night at the Cheatin' Heart and bought her a few martinis. He came onto her and the two eventually ended up back at her apartment. Nicole stopped things just short of sleeping together, but asked Rafe to stay the night anyway. Rafe agreed and when Nicole fell asleep, he searched her apartment for something to incriminate E.J. He found the recording of E.J. confessing to paying Anna to kidnap Sydney. He told Nicole that he would grant her immunity and protection if she authenticated the recording on the record. Nicole had no choice but to agree.
Rafe rushed over to the DiMera mansion to stop Sami and E.J.'s wedding. When he played the recording for Sami, she broke up with E.J. and left with Rafe. The two spent the night together and Rafe proposed to Sami. She accepted. However, what Rafe didn't know was that Sami snuck out of his apartment in the middle of the night to go confront E.J. again. Instead of talking to him, she found him passed out and holding a gun. She shot him in the head and threw the gun into the river.
The next morning, Bo questioned Sami about E.J.'s shooting. Rafe insisted that Sami was with him all night. Rafe genuinely believed that to be true until Sami confessed everything to him shortly afterwards. Despite his dedication to the law, Rafe quit the FBI and swore to protect Sami at all costs. He was even given the suggestion that they rush their marriage so that he wouldn’t have to testify against her in court should she be arrested.
Before they could wed, E.J. discovered that Sami was the one who shot him. E.J. blackmailed her into giving him sole custody of Johnny and Sydney or else he would not only turn her over to the police, but Rafe and Will as well as they were accessories since they both knew she was the culprit. Sami was cornered and tearfully agreed to E.J.’s demands. E.J. gave her one more day with the children to say goodbye before he would take them away, as he quipped, forever. Sami was devastated, but Rafe kept encouraging her that they would do whatever it took to get the children back. He also encouraged her to get married that night so that everyone would have one last happy memory as a family before the unavoidable hard times to follow. Sami agreed.
When E.J. found out that Sami was marrying Rafe, he became enraged, interrupted the festivities, and demanded Johnny and Sydney leave with him. Sami had no choice but to hand over the children to him, but vowed to get them back. Despite her heartbreak, Sami agreed to go on with the service. Rafe and Sami were officially married on November 24, 2010.
After the wedding, Rafe remained focused on returning Johnny and Sydney to Sami. He joined the Salem Police Department and began to investigate E.J. Rafe hoped that he could dig up dirt on E.J. and have him sent to prison, thus giving Sami a chance to get the kids back. His investigation stalled when it was discovered that Johnny had cancer.
Rafe stood by Sami and tried to support her as best he could, especially after the doctors had to remove one of Johnny’s eyes. A short time later, it was revealed that Johnny’s cancer had spread to his remaining eye, but, luckily, it was caught in time and his sight was spared. Johnny’s health crisis prompted E.J. to let Sami back into her children’s lives, but what nobody knew is that Rafe himself would become E.J.’s next weapon in his war against Sami.
When Rafe was hospitalized after a car accident, Stefano and E.J. switched Rafe for a double that they had hired to impersonate Rafe. The imposter was a small-time criminal, Arnold Finegan. Arnold's job was to break up Sami and Rafe's marriage and make sure that Johnny and Sydney knew that E.J. was their dad. Arnold went so far as to sleep with another woman, so Sami would think that Rafe was cheating on her. Eventually, Sami decided to take a break from Rafe.
Meanwhile, the real Rafe was being held prisoner in the DiMera basement so that he could feed information to the imposter. When Rafe refused to give any more information, Stefano injected Rafe with a memory erasing drug and sent him off to live in an institution. Slowly, Rafe regained his strength and escaped from the institution. He made his way back to Salem and eventually came face-to-face with Sami and Arnold. After a face off with Arnold, Sami realized who the real Rafe was and helped him tie up Arnold and lock him in the bathroom. Still having no memory, Rafe asked Sami who she was.
Sami told Rafe about their life together. As she was talking, Rafe regained all of his memories. The two began plotting to get the DiMeras back. They moved Arnold to an abandoned warehouse where they kept him tied up and fed him very little, in an attempt to get him to implicate the DiMeras. Arnold refused.
Because of his strange behavior in the past few months, the Salem P.D. put a tail on Rafe, which lead them to the warehouse. Bo and Hope followed up on the tip and found Arnold tied to a chair. When confronted with the news, Sami and Rafe told Bo and Hope the truth. The four of them decided to work together. They injected Arnold with truth serum and got him to confess to Fay Walker's murder. Thrilled that they finally had the proof that they needed, Bo and Hope stuck a deal with Arnold to testify against the DiMeras in return for witness protection. Just as they were about to get his official statement, Arnold was attacked and killed by fellow prisoners in the holding cell who mistook him for Rafe.
Sami and Rafe did not get to see the DiMeras go to jail, but E.J. did sign over full custody of the kids to Sami. Rafe and Sami settled into a happy life with the kids and put their marriage back together. They were happy to attend the dedication of the new Horton Town Square together.
Sami was thrilled to see Carrie, Austin, Marlena, and John show up at the dedication as well. But amidst all of the celebration, Rafe got a phone call from the FBI. Rafe was ordered to arrest John on embezzlement charges. Rafe immediately believed in John's innocence. Even after John was arrested, Rafe worked to investigate the case. When he learned that there may be a witness who could rebut some of the prosecution's case, Rafe tipped off Carrie- John's lawyer. When Roman found out what Rafe had done, Roman had no choice but to fire Rafe.
Rafe immediately assumed that Austin told Roman what Rafe had done and Rafe took his anger out on Austin. Rafe punched Austin in the face the next time that Rafe saw Austin. To make matters worse, Sami agreed to let Austin stay with them for a few days until he found a new hotel room. Rafe and Austin butted heads at home.
When Carrie found out that Rafe had lost his job helping her, she felt responsible. She convinced her firm to hire him as a private investigator and assign him to John's case. Carrie and Rafe immediately started working together. This made for uncomfortable situation for both couples as Carrie and Rafe believed in John's complete innocence, where Sami and Austin wondered if John's brain could still be under Stefano's control.
Things got even harder between Sami and Rafe when Johnny went missing after as assination attempt on John. While Johnny was missing, Sami went to confront E.J. about Johnny's disappearance. While she was at the mansion, they heard a news report that Johnny's body had been found. Overcome with grief, Sami and E.J. ended up sleeping together. But, once Sami returned home to find that Will and Rafe had found Johnny, Sami was overcome with guilt. She demanded that she and Rafe renew their wedding vows immediately and start over. The renewed their vows on Christmas Eve in front of Tom and Alice's plaque in the town square.
To avoid putting his family in any more danger, John plead guilty to all charges. But, Carrie and Rafe still believed in John's innocence. In re-examining the evidence against John, Rafe realized that the shadows in one of the picture showed that the picture had been doctored. Rafe and Carrie brought the evidence to Bo and Hope, who had their own evidence against Stefano in another case. So, Bo and Hope went to Stefano to get information about John. Stefano told Bo and Hope that he doesn't "have access" to the information that they need. Bo and Hope thought those words were a clue to freeing John.
Rafe figured out that Stefano was referring to Internet access. Rafe did some digging and found out that the government had shut down internet access for safety reasons during the time that the photo was taken of John making the transaction. Carrie and Rafe took this news to a judge and John was released, all charges dismissed.
Impressed by how well they worked together on John's case, Carrie asked Rafe to go into business with her and open up a private law firm in Salem. Rafe agreed and the two moved into an office in the Horton Square. Business was very slow at first, which gave Carrie and Rafe a lot of time to spend together waiting for the phone to ring or someone to come through the door. Carrie and Rafe began to develop feelings for each other. One day after solving a case together, they celebrated with a kiss. Sami walked in and caught them.Furious, Sami ordered Rafe to move out of the apartment.
Will was angry when he heard that Sami kicked Rafe out for a kiss, when she had slept with E.J. Will confided in Sonny, and Rafe overheard the conversation. Rafe confronted Sami. When Sami begged for another chance, Rafe refused. He told Sami to file divorce papers. Rafe also confronted E.J. and in doing so, Nicole found out about the affair. Nicole filed for divorce from E.J.
In the subsequent weeks, Rafe and Nicole bonded, and he even agreed to pretend to be the father of her child to keep E.J. away from Nicole. But, Rafe still couldn't figure out what to do about his feelings for Carrie.
When Carrie and Rafe were sent to a safe house to protect them from Stefano, Carrie and Rafe talked about their feelings. Rafe confessed to lying about being the father of Nicole's baby. Hearing that he had never slept with Nicole, Carrie decided that she wanted to be with Rafe. The two began to make love, but Carrie stopped. She wanted to tell Austin the truth before she slept with Rafe.
Carrie began feeling sick and having headaches. She thought that it was the stress of being in the safe house. But, Carrie was actually pregnant. Carrie knew that Austin was the father and thus decided to leave town and try to make her marriage work with Austin. She bid a tearful goodbye to Rafe and left town.
Rafe turned his attention towards work. He was busy investigating Stefano's murder along with Roman and a special I.S.A. agent, Spencer. When all the evidence pointed to E.J., a warrant was issued for E.J.'s arrest. However, Sami and Will helped E.J. escape Salem to buy some time to prove that E.J. was being framed. But, Rafe tracked down Sami and E.J. at a DiMera safe house and arrested them both. However, it turned out that Ian McAllister was framing E.J. and all charges against Sami and E.J. were dropped.
Since their run-in at the safe house, Rafe began to have feelings for Sami again. However, he still blamed her for their failed marriage and wasn't ready to trust her again. After a lot of pleading on her part, Rafe agreed to go to dinner with Sami. While Rafe enjoyed the date and their kiss, he still made no promises to Sami about their future.
Rafe had other women to worry about besides Sami. Rafe was still in cahoots with Nicole to pretend to be the father of Nicole's baby. And, Rafe's sister Gabi had gotten herself into a lot of trouble. Gabi came to Rafe and told him that she had paid a man to pretend to stalk her and then kept quiet when she learned that the man had kidnapped Melanie. Rafe paid for Gabi's lawyer and told her to keep quiet.
However, E.J. learned of Gabi's secret and used it to blackmail Rafe into staying away from Sami. However, the next day Sami over-heard one of E.J.'s conversations and figured out what E.J. was up to. She ran to Rafe and the two began planning their future together. Sami just wanted to know if Rafe was telling the truth about being the father of Nicole's baby. Rafe lied again and swore that he was the father.
A few days before her delivery date, Nicole suffered a miscarriage. Daniel called Rafe to the hospital. Rafe was on a date with Sami when he got the call. He told Sami that he'd be back. Sami waited for him at his apartment. Rafe came back and told her the bad news.
As Sami comforted Rafe, E.J. arrived at the apartment. E.J. had a recording of Nicole confessing that Rafe was never the father and the child was E.J.'s all along. Sami was furious and broke up with Rafe on the spot.
But Rafe didn't give up on Sami. He kept running into her and kissing her. She was with his sister, Gabi, when Gabi found out that Gabi was pregnant. Sami was the one who told Rafe and helped him through the troubling news. Little did Sami or Rafe know that Sami's son, Will, was the father of Gabi's baby.
Gabi was dating Nick Fallon. Everyone assumed that Nick was the father of the baby. Gabi, Will, and Nick decided to let everyone keep assuming so and Gabi and Nick would get married and raise the baby as their own. Rafe was worried about Gabi and asked Sami to look after her. Sami began planning Nick and Gabi's wedding. Rafe and Sami grew closer during the wedding planning, even though Sami was dating E.J. at the time. Eventually Sami decided to get back together with Rafe. She would tell E.J. after the wedding.
But, on the day of the wedding Chad announced that Nick was not the father of Gabi's baby. Will stepped in and said that he was the father. Sami was furious with Gabi for scheming to keep a Brady away from the Brady family and yelled at Gabi. When Rafe heard the way that Sami was yelling at his sister, Rafe broke things off with Sami and accused Will of abandoning Gabi.
Sami immediately moved on with E.J., making Rafe furious. Sami tried to reach out to Rafe for the good of the baby, but Rafe was worried that Sami was still after his sister, and was plotting to encourage Will to sue for full custody of the baby. He shared his suspicious with Gabi and Nick.
Worried about his sister and still upset about Sami and E.J., Rafe found himself extremely drunk one night. He ran into an equally as drunk Kate and the two ended up in bed together. The two continued to sleep together regularlly, but didn't tell anyone about their relationship.
Eventually, Sonny found out about Rafe and Kate. He told Will and the news trickled out to a few people at a time. But, Kate was worried that Rafe would be in danger if Stefano found out about their relationship. So, they kept their relationship fairly private, rarely going out in public.
Meanwhile, Gabi and Nick were married and Rafe tried to support his sister, despite his lingering suspicions of Nick. One of Nick's prison mates, Jensen, was released on a technicality and went in search of Nick. (Jensen has raped Nick in prison and was looking to abuse Nick again.) Jensen overheard Gabi talking to Nick on the phone, asking him to bring her a specific dessert from a bakery in town. Jensen when looking for Nick. When he saw the back of a man carrying a bakery bag, Jensen attacked the man. But the man turned out to be Rafe. Jensen realized that he'd made a mistake, but since Rafe had seen Jensen's face, Jensen went ahead and beat Rafe.
Kate found Rafe badly beaten in the alley and called the police. Rafe was taken to the hospital and put into a medically induced coma to allow his body time to heal. Furious and certain that Stefano was behind the beating, Kate went to the DiMera mansion to yell at Stefano. But, Stefano was shocked to learn that Kate had started a relationship with Rafe. He hadn't ordered the beating. But now that he knew about Rafe and Kate, he began plotting something else for Rafe.
Stefano called his police informant/DiMera soldier, Det. Joe Bernardi, to carry out a revenge plot. Stefano gave Joe a razor and ordered Bernardi to sneak into Rafe's hospital room and cut off Rafe's penis. Bernardi was reluctant at first, but took the razor and agreed to Stefano's request.
Rafe staid in the coma for several months. Many people came to visit him, including Sami. While Sami was visiting, she went into the bathroom to get a cold washcloth for his head. Just as she was coming out of the bathroom, she saw Bernardi standing over Rafe's body, raising the razor. Sami immediately shot Bernardi. Doctors rushed in and took Bernardi into surgery. He died in recovery. Sami was arrested for murder.
When the doctors woke Rafe up, they warned Kate and Gabi that Rafe may not be able to distinguish reality from his dreams for a while. When Rafe woke up, he insisted that Sami had tried to shoot him. But, he soon learned that Sami had shot Bernardi and wondered what happened. As the details emerged, Rafe was sure that Sami saved his life and even testified in her defense.
Meanwhile, Rafe focused on his recovery. Kate hired a physical therapist for Rafe. Jordan Ridgeway arrived in Salem to help Rafe recover. Jordan was a strict woman with a pony tail and glasses. But, Rafe saw more in Jordan. He flirted with her and eventually got her to open up a bit. They shared a kiss, but Jordan told Rafe that things couldn't go any further while he was still her patient.
Rafe continued to heal and as soon as he could be relased from the hospital to continue his therapy at home, he fired Jordan and hired a new therapist. Jordan and Rafe began dating and were very happy together.