Jurors convicted a St. Paul defendant Friday for fatally stabbing a man earlier this year after they offended each other during a rap battle.

Quinten L. Osgood Jr., 29, was convicted in Hennepin County of two counts of second-degree murder and one count of first-degree manslaughter for the January killing of Anthony Madison.

Osgood testified on his own behalf this week, crying on the witness stand as he told jurors that he acted in self-defense. Prosecutors attacked his credibility and cast doubt about which man brought the knife to the street fight.

Osgood testified that he was visiting Madison’s apartment near E. 35th Street and 1st Avenue S. Madison left and returned a few times while Osgood remained in the company of Madison’s girlfriend and another woman listening to music and drinking.

Osgood testified that he met Madison for the first time that night, and had felt welcomed into his home. But, he told jurors, Madison returned and was unhappy with Osgood’s choice of “soft sex R&B” music.

Madison requested different music, Osgood said. Osgood played wordless rap beats on his phone, and the two men started rapping impromptu lyrics.

But the “playful” exchange grew “raw,” he testified.

“It became more of a battle in a sense — him disrespecting me and me doing the same thing,” Osgood testified. “It became really heated.”

Osgood said both men began swearing at each other, and he decided to leave.

Video surveillance from the scene played in court showed Osgood walking out of the building to the sidewalk, kicking open a chain-link gate on his way out. The video showed Madison running after Osgood after the kick to the gate, and a woman following the pair.

Another video from a distance showed Osgood running backward and falling to the ground as Madison pursued him. Madison got on top of Osgood and the two struggled.

Osgood testified that while Madison was on him, a knife dropped to the ground from Madison’s body. Osgood said he grabbed the weapon when he saw Madison reaching for it, and out of fear for his life, he “poked” Madison with the blade.

“I was just scared,” Osgood said under questioning by one of his attorneys, Briana Perry.

Osgood left the scene.

Hennepin County Senior Attorney Dominick Mathews aggressively dismantled Osgood’s version of events. Mathews noted that Madison was wearing gym shorts and a T-shirt in an attempt to show that Osgood, who wore a large coat, could have brought the knife instead.

Mathews highlighted that contrary to Osgood’s courtroom testimony, Osgood never told police Madison had threatened to kill him or that Madison had the knife on him. Confronted with a transcript of his statements to police, Osgood agreed with Mathews.

“You stabbed him?” Mathews asked.

“Yeah,” Osgood said.

Osgood is scheduled to be sentenced Sept. 16.