Police were called to Snowden Road in Ely around 6pm after receiving reports of a collision.
A fire was burning and a helicopter could be heard hovering overhead as rioters threw missiles, including fireworks, at attending officers.
Police said the collision “had already occurred when officers arrived”.
Scenes being livestreamed on YouTube showed young people throwing fireworks and other missiles at a line of police officers with riot shields who were blocking one end of the street.
Shortly before midnight a car was set on fire and burned fiercely, while a second vehicle was overturned and set ablaze.
A member of the public was attacked due to rioters thinking they were an undercover officer, according to a senior officers at the scene.
At 8.21pm, South Wales Police tweeted: “There is now a large number of officers working to manage the collision, but also to de-escalate ongoing disorder at the scene.
“We urge anyone involved to leave the scene immediately and ask local residents to stay away while the matter is brought to a safe conclusion.”
At 1.10am police said they were continuing to monitor and respond to “disorder in Ely”, adding: “A number of vehicles have been set alight. Arrests are being made. A large police presence remains in the area.”
PA
Police, including mounted officers on horseback, were seen outside Ely police station in the early hours of Tuesday after suggestions it could be targeted.
Shortly before 3am, rioters moved down Highmead Road in Ely, followed by police who were trying to disperse them.
The rioters continued to throw missiles and set cars alight.
Jane Palmer, the owner of a burnt out Ford Focus on Highmead Road, said she and her family watched from their window as rioters set fire to her car.
Ms Palmer said: “I’m disabled so now I’m trapped without my car.
“Why are they doing this? It’s just silly now.”
The family attempted to stop the fire using water from their garden hose.
A man called Connor, who also lives in Highmead Road, said: “It’s been a mad night. This is not the norm around here but people are pretty anti-police and that’s reflected on both sides, not that that’s my opinion.
“Although we’ve been afflicted by this riot, I still understand it. When people have enough, this is what happens.”
Rubbish and wheelie bins were set alight as well as cars by rioters as they continued to be moved through the streets by armoured police.
Rioters gradually moved down Highmead Road in Ely, Cardiff, followed by police who were trying to disperse them.
The rioters continued to throw missiles and set cars alight.
One resident of Highmead Road, who did not want to be named, told the PA news agency: “Enough is enough now. This has gone beyond.
“When people are making fun of what’s happening on social media it’s crossed a line.
“This is our neighbourhood and those doing this are just kids. It needs to stop.”
John Urquhart, the general secretary of the UK Harmony Party, lives in Ely and witnessed the incident escalate from the start of the evening.
He told the PA news agency that a lack of communication from police to the community may have led to the escalation of the event.
He said: “The key thing right at the start was they did not communicate with the crowd, there was no attempt to communicate with the crowd and they showed nothing but disdain for the community and acted like we didn’t deserve to know what happened on our own doorstep.
“There was nobody going through the crowd crucially, I think the police really needed people to be out talking to the community and putting their minds at ease.”
He said the community in Ely is tight-knit.
“When you start to see it in context, it’s emotions that have built up and bottled up and eventually, I think the police just brought too many people or were too visible.”