The police officer who pulled a gun on a man picking up trash outside his own home in Boulder, Colorado, has resigned, city officials said Thursday.

Boulder officials conducted an investigation of the March incident of officer John Smyly confronting Zayd Atkinson outside his home.

Smyly attempted to detain Atkinson, a student at Naropa University in Boulder, asking him to prove he lived on the property.

Atkinson, who is black and said after the incident that he felt he was racially profiled, showed Smyly, who is white, his student identification card, but the officer said he needed needed further proof.

On body-camera footage the city released Thursday, Atkinson can be heard saying, “I’m a student, I live here ... I’m doing my job.”

As Atkinson attempted to continue to pick up trash, Smyly told him, “You’re probably going to get tased,” and eventually pulled out his gun, claiming Atkinson’s trash grabber could be used as a weapon.

“You’re on my property with a gun in your hand, threatening to shoot me because I’m picking up trash,” Atkinson said. "I don't have a weapon. This is a bucket. This is a clamp.”

At one point, eight police officers were surrounding Atkinson, but they eventually left after “confirming” Atkinson did indeed live in the building as he claimed.

A video showing part of the scene went viral on the Internet, sparking outrage in the progressive Colorado city.

On Thursday, the city announced the conclusion of an internal investigation, saying it found Smyly violated two department policies could not substantiate claims of racial bias. However, Smyly resigned before the investigation concluded. He will be on the city payroll until February 2020.

“The exchange between Officer Smyly and Mr. Atkinson does not represent the professionalism of the Boulder Police Department nor the community Boulder desires to be,” City Attorney Tom Carr said in a statement.

Atkinson’s attorney, Siddhartha Rathod, said he thinks Smyly is getting off too easy. "Boulder is essentially saying, 'We're going to pay this officer and let him resign for threatening Zayd's life, for racially profiling Zayd,'" Rathod told The Associated Press. "If you or I were to do this, we would be criminally charged. We would immediately lose our jobs."