A Canadian fugitive has been arrested in Texas after he allegedly confessed to fatally stabbing his girlfriend two months ago on Reddit.

Ager Hasan was apprehended by Secret Service agents during a traffic stop in San Antonio, Texas, on Tuesday.

Hasan was taken into custody following a two-month manhunt for the 24-year-old after he allegedly killed his girlfriend Melinda Vasilije, 22, on April 28.

Hasan fled to the US just hours after Vasilije's death and seemingly 'confessed' online to the stabbing attack at Vasilije's home in Kitchener, Ontario.

In a Reddit post purportedly written by Hasan, the author described events of Vasilije's murder, recalling pushing the woman and grabbing a knife.

Although Hasan managed to avoid police for nearly three months, it seemed he was ready to turn himself in, according to an Instagram that is believed to be Hasan's.

A photo uploaded on Tuesday read: 'I'm coming home. It's time to end the dark path I've been traveling and give people the closure they deserve.'

Ager Hasan, 24, was arrested by Secret Service agents in San Antonio on Tuesday. The Canadian fugitive is charged with the murder of his girlfriend Melinda Vasilije, 22, who died on April 28 in Ontario, Canada

The woman was found dead with multiple stab wounds and Hasan fled to the US shortly after she died, according to reports. In May, a Reddit post was purportedly written by Hasan and detailed the murder, recalling pushing Vasilije and grabbing a knife

Hasan was wanted for second-degree murder and three counts of breach of recognizance, reported Global News.

The breaches of recognizance refer to a 'domestic-related incident' on April 3, when Hasan was arrested for two counts of assault during a break-and-enter.

While Vasilije was not a victim in that incident, Hasan was restricted from her town of Kitchener and barred from contacting her, according to the police.

Weeks later, the 22-year-old was found dead around 3am on April 28 after police responded to a 911 call.

She suffered multiple stab wounds, and Hasan became a prime suspect.

But the 24-year-old had fled the country and had been last seen on April 28 stealing a license plate in the parking lot of a Walmart in Erie County, Pennsylvania, to replace the Ontario plate on his black, 2016 Honda.

Since that moment, police have been looking for Hasan who managed to avoid police for nearly three months, but has been seemingly active on social media.

An Instagram account purportedly belonging to Hasan uploaded several photos of Hasan and Vasilije together, detailing the troubles of their relationship on Tuesday.

On Tuesday, this photo was uploaded to an Instagram account, believed to belong to Hasan. It read: 'I'm coming home. It's time to end the dark path I've been traveling and give people the closure they deserve'

Hasan and Vasilije had been dating for around a year, according to multiple reports

It read: 'You were always one step ahead of me on the contributions to our relationship. You wanted kids, marriage and to start a family but I wasn't ready.

'I kept holding it off and wanted to give it more time. Your love for me was beyond my comprehension and I needed time to understand why it was there.

'The fights and arguments we got into were about minuscule things, but I would always tell you to tell me if something was on your mind, talk and not hold it in, you never did that.

'You would always hold things in and lash out after an extended period of time. Communication is what led to the downfall of us. I hope justice is served and punishment is given accordingly to what happened that night.'

A Reddit post, purportedly written by Hasan, was published in early May but has since been removed from the site.

It was titled 'Wanted for Kitchener murder my side' and according to the post, the couple had recently broken up and started patching things up again.

When Hasan admitted to seeing other people while they were on a break, the two began fighting, according to the Reddit post.

On the same day he was arrested, Hasan allegedly detailed the nature of their relationship. The post read: 'Communication is what led to the downfall of us'

The post added: 'I hope justice is served and punishment is given accordingly to what happened that night'

It read: 'She started freaking out. Wouldn't say a word and just kept slapping me with tears in her eyes. Slaps turned into hits. I told her I was sorry but if she didn't stop I'd do something back. She didn't stop. I then stupidly pushed her, harder than I expected. She fell against the sink.'

'Almost out no where she grabs a knife by the sink. Initially I thought [she] was just going to hold it to try and tell me to leave. She doesn't. She comes at me in full force, aiming towards my face,' the Reddit post states.

'I tell her to stop. She doesn't, I tried grabbing the knife but ended up cutting my hands. After a few cuts I lost it. I freaked out, I was scared and in a state of shock.

'Never in a hundred years did I think she would use a knife against me. Out of shock and fear I grab one. I hit her with it, almost blindly. A few times. I didn't know what happened. I was confused, shocked and scared.

'I had no intentions of that happening. When I left I honestly thought she just passed out. Then I looked at the blood, and started freaking out and just ran. I didn't [know] for sure she had died until the next day. I honestly had no intentions of ever doing that to her, I was protecting myself.

The Reddit user also maintained the two were best friends, apologized to Vasilije's family, and wrote: 'Rest in peace my beautiful. I hope you forgive me in the after life.'

When Hasan admitted to seeing other people while they were on a break, the two began fighting, according to the Reddit post. He maintained they were best friends and apologized

The person alleging to be Hasan also disputed the idea that he was running away, writing he needed some time to process what happened before turning himself in. Pictured: A text exchange included in the Reddit post, purported to be last texts between Hasan and Vasilije

The person alleging to be Hasan also disputed the idea that he was running away, writing he needed some time to process what happened before turning himself in.

Authorities in Canada have not confirmed if the Reddit post or Instagram account that openly discuss the case, was controlled by Hasan.

'Our investigations are still ongoing in relation to the social media posts that Mr. Hasan has been believed to be posting over the last number of months,' Waterloo Regional Police Inspector Mike Haffner said.

Hasan was arrested after an unrelated traffic stop, which was being conducted by the Secret Service in relation to an ongoing counterfeit investigation.

Officials claim Hasan was attempting to reach the Mexican border before he was stopped.

He was traveling in a car that had stolen Arkansas plates. Throughout the manhunt, police said Hasan was spotted in Pennsylvania and Tennessee, stealing plates.

Hasan is being held in San Antonio and was expected to appear in court on Wednesday pending extradition to Canada, reported to NBC News.