MOSCOW — After the revolution in Ukraine last year, President Vladimir V. Putin sent military forces to secure Crimea and even weighed putting Russia’s nuclear arsenal on alert because of his concerns about both anarchy and Western intervention, the Russian leader said in a documentary broadcast Sunday.

The documentary, called “Homeward Bound,” was produced by the state-run Rossiya 1 channel to celebrate the anniversary of the March 21, 2014, annexation of Crimea, the Black Sea peninsula that was given to Ukraine in 1954 when both were a part of the Soviet Union.

The film presented the events as a triumph of security planning and execution, with Mr. Putin at its heart. Throughout the documentary, which ran for two and a half hours, Mr. Putin tried both to justify the move — which most Western nations considered outside international law and led to economic sanctions that have magnified Russia’s current, oil-related recession — and to boast about it.

“The overall tone is upbeat: Russia’s greatness and fulsomeness being restored,” wrote Dmitri V. Trenin, the head of the Carnegie Moscow Center, in response to a question via email. “With respect to the U.S./West: keep away from this, it’s our people, our historical land, our stakes are so much higher than yours, we will always outbid you if necessary.”