A battle ensign is the name given to a large war ensign (flag) hoisted on a warship's mast just before going into battle.
The Tonnant at the Battle of the Nile, by Louis Lebreton.
Niagara flying Perry's Don't Give Up the Ship battle ensign at the Battle of Lake Erie, 10 September 1813.
USS McFaul flying her battle ensign as she returns to Naval Station Norfolk, Virginia from deployment.
Battle ensign of the Imperial Japanese Navy.
A naval ensign is an ensign used by naval ships of various countries to denote their nationality. It can be the same or different from a country's civil ensign or state ensign.
Russian Project 775 landing ship Korolev. Note the Russian naval jack at the front and naval ensign at the rear.