The first black woman to serve as a police chief in Virginia said Monday that she was forced to resign last week by a group of racist officers who opposed her efforts to change the culture of the Portsmouth Police Department.

The former chief, Tonya D. Chapman, said in a statement that when she took the job in 2016, she knew about “public friction” between city leaders and “the external strife that existed between the community and the Police Department as a result of several officer-involved shootings.”

But she said those tensions soon reached a boiling point when a former officer, Stephen Rankin, was convicted of voluntary manslaughter in August 2016 in connection with the 2015 shooting death of an unarmed black teenager, William Chapman II, who was not related to the former chief. Mr. Rankin was sentenced to two and a half years in prison and was released in November.

After Mr. Rankin’s conviction, “racial tensions within the Police Department became blatantly apparent to me,” Ms. Chapman wrote. That included deeply held prejudice among “a small contingency of the Police Department,” which serves a city of about 95,000 people in Southern Virginia that according to census data is more than 52 percent black.