The Markarth Incident was a battle that took place after the Great War and before the Civil War in Skyrim. Events in the city of Markarth sparked the latter and later became known as the Markarth Incident.
In 4E 174, Markarth and the Reach was subjected to what is known today as the Forsworn Uprising. While the Empire was beset by the Aldmeri Dominion in the Great War, the native Breton people of the Reach, called the Reachmen, took this opportunity to seize control of the city. This was only possible as the Imperial Legionnaires stationed in Markarth were recalled to fight, leaving the city very vulnerable.
The Jarl of the Reach could not quell the uprising and was killed in the struggle. The rebellion was successful, and the Reachmen ruled over Markarth and The Reach as an independent kingdom from Skyrim from 4E 174 - 4E 176. During this time, the Kingdom was relatively peaceful, and the Reachmen ruled their lands fairly and were making overtures to be recognized by the Empire as a legitimate kingdom.
In 4E 176, the Great War ended with the Empire signing the White-Gold Concordat. During this time, Igmund, son of the previous Jarl, took it upon himself to seek help from Ulfric Stormcloak in ousting the Reachmen invaders. He promised Ulfric that if he re-took the Reach, then Igmund as Jarl would allow free worship of Talos - an act that was recently outlawed at the end of the war. Ulfric agreed and marched his militia to the gates of Markarth and ruthlessly retook the city using the power of his Thu'um.
Reports vary, but it is said that every official who worked for the Reachmen was killed, even after they had surrendered. Native women were tortured to give up names of Reachmen fighters who had fled the city. Anyone who lived in the city, Reachmen and Nord alike, were executed if they had not fought with Ulfric and his men when they breached the gates. Ulfric supposedly even ordered the deaths of shopkeepers, farmers, the elderly, and any child old enough to lift a sword that had failed in the call to fight with him. (Note: These events were recorded in a possibly biased imperial published book known as The Bear of Markarth)
The leader of the Reachmen, Madanach, was captured by Igmund but was spared by Thonar Silver-Blood, as he was more valuable as alive than dead. The surviving Reachmen fled to the hills of the Reach and became known as the Forsworn.
In Markarth, Jarl Igmund kept his promise to Ulfric and allowed free worship of Talos. When the Imperial Legion arrived to restore the rule of law, Ulfric refused them entry into the city until they also agreed free worship of Talos would be allowed. With chaos running through the streets of Markarth and the reports of deaths rising every day, the Empire had no choice but to grant Ulfric and his men their worship, thus jeopardizing the peace agreement with the Aldmeri Dominion.
Eventually, The Empire rescinded upon the agreement due to pressure from the Aldmeri Dominion, and Ulfric and his militia were expelled from the city and imprisoned shortly after. This betrayal left Ulfric bitter towards the Empire and is considered to be the initial conception of the Stormcloak rebellion.