KINGSVILLE — A man accused of robbing a Kingsville bank at gunpoint in August 2014 was sentenced to more than two decades in prison Friday.

Mario Martinez, 26, was sentenced to 25 years in prison after a two-day sentencing hearing before 105th District Judge Jack Pulcher, court officials confirmed. Martinez also must pay more than $49,000 in restitution.

Martinez pleaded guilty in February. He was scheduled to go to trial, but instead entered an open plea.

Martinez stood accused in the Aug. 29, 2014, robbery at the IBC Bank in Kingsville near Santa Gertrudis and Armstrong avenues. A men wearing a motorcycle helmet entered the back around 5 p.m., then went over the counter with a gun drawn, demanding money.

Martinez has claimed that a BB gun was used in the robbery, and his indictment was adjusted to reflect that as a part of the agreement with prosecutors, according to a previous Caller-Times article.

He and a codefendant, Joanna Cantu, were later arrested in connection with the incident.

Cantu, who was an employee of IBC bank at the time, is expected to stand trial in June, according to court officials. She is facing two first-degree felony charges of aggravated robbery.