A witness to the murder of a police deputy was in a 'romantic relationship' with the married officer and was in his patrol car when he was gunned down at a gas station, according to court documents.

Harris County Deputy Darren Goforth, 47, was shot as he filled his patrol car with gasoline at a suburban Houston convenience store on August 28.

Shannon Miles, 30, was arrested the following day and has been charged with capital murder.

Now, according to court documents dated September 16, a witness to the murder was allegedly having an affair with the father-of-two for 15 months until his death.

Scroll down for video

A witness to the murder of Harris County Deputy Darren Goforth (left) says she was having an affair with the married father-of-two. Shannon Miles (right) has been charged with capital murder in the case

Kathleen Goforth (right) described her slain husband, deputy Darren Goforth (left) as a 'good' and 'fiercely loyal' man after he was shot dead at a gas station last month

ABC13 reported the woman, who has not been named, took a polygraph test and gave statements that have now been handed to defense attorneys.

Miles’s defense attorney Anthony Osso said he was aware of the filing, but it is too soon to tell what it may mean for his client’s case.

But he said his office were not responsible for the document's release.

He told the Chronicle: 'I specifically didn't want to air it out. I don't want to try this case in the media.'

ABC13 reporters had also apparently spoken to witnesses who said a woman had been seen crying over Goforth’s body on the night of his death.

But family friend Robert Partin told Eyewitness News the claims are ‘a lie’.

The father-of-two (right) pictured with his wife Kathleen and two children in 2010, was allegedly having a relationship with another woman, who was in the car when he was killed, according to court documents

He said: ‘As his good friend, I adamantly believe that’s a lie. There’s nothing farther from the truth.

‘I will do everything in my power to keep his image from being tainted.’

Goforth’s death shocked the nation when he was gunned down execution-style last month after stopping to buy gas on Telge and West Road in northwest Harris Country.

Police say Miles approached the deputy from behind and fired multiple shots. Even after he fell to the ground, detective allege Miles continued firing.

Harris County Sheriff Ron Hickman called the murder, which was captured on surveillance cameras, a ‘cold-blood assassination’ but no motive has yet been suggested for the attack.

Earlier this month, more than 11,000 people turned up to pay their final respects at Goforth’s funeral.

Goforth, a sheriff's deputy in Harris County, Texas, left behind a wife, pictured right, and two children, aged five and 12

Around 11,000 people gathered at Second Baptist Church in Houston to pay their respects to the slain officer at his funeral earlier this month

In emotional scenes, his widow Kathleen, closed her eyes and wept as her husband’s body was laid to rest along with their two children, aged 12 and five.

After Miles was charged, she paid tribute to her slain husband, calling him and ‘good’ and ‘fiercely loyal’ man.

Mrs Goforth's statement, reported by NBC News, said: 'There are no words for this. My husband was an incredibly intricate blend of toughness and gentility.

'He was always loyal, fiercely so. He was ethical. The right thing to do is what guided his internal compass.'

'He was good. If people want to know what kind of man he was, this is it: he was who you wanted for a friend, a colleague and a neighbor.