VIRGINIA BEACH, Va. (WVEC) -- A former convict is suing the Virginia Beach Jail and the state Department of Corrections.

John Louis Freeman claims they violated his rights by keeping him imprisoned 77 days longer than his sentence required.

According to the suit filed by the ACLU on his behalf, Freeman was arrested in Massachusetts and held there for 515 days between 2011 and 2013. Freeman also spent 14 days in jail in 2014 as he awaited extradition to Virginia.

According to the report, he only received partial credit for the time he served in Massachusetts.

In total he was expected to spend 957 days in prison, but when that day came on July 13, 2015 the correctional center did not abide by that order.

Freeman was not released until August 12, 2015. He spend a total of 1,034 days in jail for his crimes.

The lawsuit is seeking repayment for legal fees and damages.

The Virginia Beach Sheriff's Office issued the following statement:

Neither Sheriff Stolle nor the Virginia Beach Sheriff’s Office has been served with the lawsuit. However, the American Civil Liberties Union notified the Sheriff of its existence this past weekend.

John L. Freeman was a Virginia Department of Corrections prisoner during his 2015 commitment in the Virginia Beach Correctional Center. Anyone sentenced to more than a year of incarceration immediately becomes the responsibility of the Department of Corrections, even if they are held in a local jail. In those cases, the Virginia Beach Sheriff’s Office does not have the authority to calculate the inmate’s release date nor to release them from the jail without approval from the DoC. The DoC is responsible for calculating how much time the prisoner must serve and their release date based on their applicable sentencing orders. That information is provided to the holding facility. If a prisoner’s sentence is modified by a court order, the DoC is responsible for updating that information and providing the holding facility with a new release date. In Mr. Freeman’s case, that had not been done, so we were required to continue holding him until otherwise directed by the DoC.

We do not have the authority to release any state-responsible inmate without proper discharge papers from the Department of Corrections.

Sheriff Ken Stolle: “In early August 2015, the ACLU contacted me and asked that I look into Mr. Freeman’s situation because they were concerned that his time had not been properly recalculated by the Virginia Department of Corrections following a court order giving him credit for previous time served in another jurisdiction. I immediately had my staff contact the Department of Corrections, which recalculated his time and provided an order of release dated Aug. 11, 2015. Upon receipt of that order, Mr. Freeman was immediately released from the facility.”