Battle of Hokuetsu

The was a battle of the Boshin War of the Meiji Restoration, which occurred in 1868 in the northwestern part of Japan, in the area of modern Niigata Prefecture.
Background.
The Boshin War erupted in 1868 between troops favorable to the restoration of political authority to the Emperor and the government of the Tokugawa shogunate. The new Meiji government defeated the forces of Shōgun Tokugawa Yoshinobu (mostly from the western domains of Satsuma and Chōshū) at the Battle of Toba–Fushimi, and afterwards divided into three armies to advance on the Shogun’s capital of Edo. The imperial army marching up the coast of the Sea of Japan was commanded by Yamagata Aritomo and Kuroda Kiyotaka.
Summary.
Makino Tadakuni, the "daimyō" of Nagaoka, in Echigo Province (modern day Niigata Prefecture) was a supporter of the Tokugawa shogunate, and refused to submit to the new government even after the fall of Edo Castle to the imperial armies. With the assistance of two Prussian businessmen (the brothers Edward and Henry Schnell) as military advisors, he purchased two Gatling guns (only one other existed in Japan at the time), 2,000 French rifles, and various other armaments.
On May 4, 1868, Nagaoka joined the Northern Coalition against the Imperial government. The Imperial army was intent on seizing Niigata harbor to facilitate the supply of weapons and troops in the campaign against Aizu and Shōnai, the two main centers of the revolt.
In the ensuing campaign, Imperial troops suffered heavy losses on land, especially due to the action of Nagaoka's Gatling guns. In the meantime, a small commando team reached Nagaoka Castle by sea, and set it on fire. The castle fell on July 8, 1868. A secondary action occurred two months later, when surviving Nagaoka troops, together with troops from Aizu, managed to take the castle back on September 10, throwing the Imperial side in disarray. However, the attacking side also suffered serious losses, including its leader Kawai Tsugunosuke, who was wounded during the battle and later died of gangrene in Aizu. The castle was retaken by the Imperial troops on September 15.
Aftermath.
The Battle of Hokuetsu ended the last resistance to the new Meiji government on the Sea of Japan coast of Honshū, and isolated the remaining center of resistance: Aizu. After an unsuccessful effort at stopping the progress of the Imperial armies at the Battle of Bonari Pass, the next key battle in the Boshin War was the Battle of Aizu.