The Marine who's accused of attempting to murder a law enforcement officer has accepted a plea deal.

The judge in the trial stated the plea is 15 years in prison with a minimum of 10 years that must be served and lifetime probation.

The plea came after the jury members sent questions about what happens if they can't make a decision.

During the trial, neither side disputed that Matthew Buendia fired at Hillsborough County Deputy Lyonelle De Veaux back in 2011. The question in the attempted murder trial was whether Buendia knew what he was doing.

Deputy Lyonelle De Veaux was in court and said she agreed to the deal.

Friday, during closing arguments, Buendia's attorney reiterated what they've been saying all along, that Buendia was mentally deteriorating and flashbacks from the war caused him to shoot Deputy De Veaux.

"Matthew Buendia is not a hero," said O'Brien. "He is a United States Marine and he did his job just like any other United States Marine but when he came back, he was not the same."

O'Brien argued that Buendia belongs in a mental hospital, not prison. But, the state prosecutor had the last word to jurors. 

While the state agreed that Buendia suffered from post traumatic stress disorder, the prosecuting attorney stressed Buendia's illness did not cause him to pull the trigger. 

"He was aware of the situation when he was walking up and formed the intent during this situation to shoot Deputy De Veaux when it became evident that he was going to have to go back to the apartment and he was going to be arrested," said Falcone. 

The medication Buendia was prescribed and the illegal drugs he took were evidence in the trial.