The cause of the U.S. participation was pirates from the Barbary States seizing American merchant ships and holding the crews for ransom, demanding the U.S. pay tribute to the Barbary rulers. United States President Thomas Jefferson refused to pay this tribute. Sweden had been at war with the Tripolitans since 1800.
Rebels attempted to overthrow a dictatorial government.
From the start Czar Nicholas II was not prepared or ha no real training as a Czar so therefore he made mistake after mistakes.