A Twin Cities man with a lengthy criminal record got another 17 years on his prison term Monday when he was sentenced in Dakota County District Court for the attempted murder of a man in a dispute about a borrowed car in South St. Paul.

Desean L. Thomas, 23, pleaded guilty to the Aug. 19, 2014, shooting of the 51-year-old South St. Paul man, who had lent Thomas' girlfriend and sister a rented car. When the two women refused to return the car, the victim confronted them twice before Thomas shot him in the hip.

Police found 14 shell ­casings at the scene.

Thomas was convicted in October of second-degree attempted murder, being ineligible to possess a firearm and drive-by shooting. On Monday, Dakota County District Judge Arlene Perkkio sentenced him to nearly 17 years for the attempted murder and five years for the firearm charge.

The two sentences will be served together, and at the same time as a 37½-year sentence he is serving for the 2012 St. Paul murder of a man caught in the middle of a gang feud. He was sentenced for that crime in July in Ramsey County.

Thomas' girlfriend, ­Breanna S. Harris, 22, of South St. Paul, pleaded guilty Dec. 17, 2014, to second-degree assault in connection with the South St. Paul shooting. She was given a stayed 21-month prison sentence and seven years' probation. His sister, Danielle Thomas, has a charge pending of second-degree assault.

In the St. Paul case, Desean Thomas was convicted in May in the death of Leonard Christian Sr. on March 30, 2012. Christian's son was the target, authorities said.

Court records show that Thomas has been tried in adult court since he was 16.