The line to board Coast Guard cutter Eagle in Baltimore’s Inner Harbor was 300 deep even before the tall ship opened for visitors Friday morning, no surprise to Lt. Kristopher Ensley, the ship’s operations officer.

“It’s a sailing ship in the age of nuclear-powered aircraft carriers,” Ensley said. “People are fascinated by that.”

Eagle arrived here Thursday to join dozens of ships from around the world to mark the bicentennial of the War of 1812.

The war was one of the last major conflicts fought during the Age of Sail, but 200 years after it was declared, the Coast Guard uses the three-masted square-rigger to train future officers.

The very anachronism of sailing a square-rigger using sextants and celestial navigation at a time when armed drones and Global Positioning Systems dominate is part of Eagle’s appeal. Like most colleges, the U.S. Coast Guard Academy in New London, Conn., has no shortage of tech-savvy students.

“They know how to text,” said Cmdr. Michael Turdo, Eagle’s executive officer. “Out here, we’ve moved them away from technology. We want to make sure when they look at radar, they’re not just reading a box.”

Eagle arrived for the Baltimore’s Star-Spangled Sailabration, which runs through Monday. The celebration is part of OpSail 2012, which is marking the bicentennial with a parade of tall ships to six American cities. Baltimore is the fourth stop, following New Orleans, New York and Norfolk, with Boston and New London to follow.

This year’s OpSail is the first since the millennium celebration in 2000 and comes in the wake of four others, including the Statue of Liberty centennial in 1986 and the bicentennial of the American Revolution in 1976.

Under the supervision of Eagle’s cadre of six officers and 50 enlisted sailors, the 130 cadets aboard plotted the course, set the sails and steered the ship during much of its journey to Baltimore. As the 295-foot ship gingerly eased into its berth Thursday morning, cadets turned the pins of the wood-and-brass three-wheeled helm, responding to intricate rudder commands barked from officers on the bridge.

Capt. Eric Jones, commander of the ship, remained tranquil behind his aviator glasses as Eagle’s bowsprit glided to within a few feet to that of the Gloria, the Colombian navy’s tall ship.

Not that the captain had forgotten the consequences of any errors. “Am I aware that I’m handling a 76-year-old national treasure?” asked Jones, standing by the pilothouse as the ship nestled safely by the pier. “Absolutely.”

Eagle is equipped with GPS, radar and most other modern conveniences, but the cadets learn how to operate without them. It is no simple matter to sail the barque, with its 22,000 square feet of sail and five miles of rigging, controlled by more than 200 lines.

“I wish I could go back in time and tell them not to build square-riggers,” said Cadet 3rd Class Dylan Finneran.

But the intricacies of sailing a square-rigger are not the reason the Coast Guard sends all of its third-class cadets — rising sophomores — as well as most of its officer candidates for a cruise on Eagle.

“It’s all about making sure they understand what it’s like to be a mariner and going to sea,” Ensley said. “The whole sailing rig? That’s just a means to an end.”

The physically and psychologically challenging conditions are meant to promote teamwork, coordination and communication among the cadets. During their six-week cruise, they climbed rigging to the top of the masts, as high as 147 feet above the waterline. They stood midnight watches. They slept in cadet berthing below deck, stacked three deep in bunks so tight that anyone turning over risked getting stuck.

For the third-class cadets aboard Eagle, Baltimore is the end of the six-week summer cruise, and they will get off the ship Saturday to board buses returning them to New London or to travel to other Coast Guard assignments. (The ship will not be open for tours Saturday or Sunday because of the crew change.)

Their triumphant arrival in Baltimore, manning the rails as Eagle cruised past Fort McHenry, is a far cry from early May, when the cadets boarded the ship during a port call in Savannah, Ga. As soon as they sailed into the ocean for New York, Eagle was lined with cadets who were clipped by harness to the rail, getting sick overboard for hours at a time.

The ship made the journey from New York to Norfolk entirely under sail. But contrary winds prevented Eagle from sailing up the Chesapeake Bay for most of the three-day Norfolk-to-Baltimore leg, and it instead relied on its 1,000-horsepower diesel engine.

This left plenty of time for the cadets to be put to work chipping away rust and painting rails, a never-ending chore on an old steel ship in saltwater.

During the War of 1812, the revenue cutter Eagle chased and caught merchant ships carrying British cargoes. The origins of the current Eagle, the seventh American ship to carry the name, are quite different.

It began life as the Horst Wessel, one of a new class of heavy-steel sailing vessels built for Nazi Germany’s training fleet. Chancellor Adolf Hitler attended the 1936 launch of the ship, named after a thug who wrote the lyrics for the Nazi anthem and was built posthumously into a martyr by the party’s propaganda machine.

At the war’s end, Germany’s four training tall ships were seized as reparations. The Horst Wessel, awarded to the United States, was sailed in 1946 across the Atlantic Ocean and through a hurricane by a Coast Guard crew, aided by the ship’s German crew.

A number of nations still train sailors on tall ships, including Brazil, Colombia, Indonesia, Spain, France, Ecuador and Mexico, all of which will be participating in one or more OpSail 2012 port calls. The U.S Naval Academy in Annapolis — beaten to the punch by the Coast Guard for Eagle — trains midshipmen on 44-foot sloops.

Eagle costs about $1 million a year to operate. “Every once in a while, somebody asks, ‘Why do we still have it?’ ” said Jones, who added that the Coast Guard is developing plans examining “what it’s going to take to sail Eagle for another 40 years.”

Anchored off Annapolis on Wednesday evening, the cadets were put to work polishing brass in preparation to take on visitors in Baltimore. A huge cheer erupted upon the announcement over the ship’s intercom that the crew members were free to use their cellphones.

Soon, Eagle’s teak deck was covered with cadets calling and texting girlfriends, boyfriends and parents, rejoining the 21st century. After the sun set, their faces remained bathed in the glow of iPads and Android devices.

Before Eagle departs Sunday morning for Boston’s War of 1812 commemoration, a new crop of 128 cadets from the academy will arrive on buses and board the ship Saturday for their journey back in time. “We go back to zero again,” said Master Chief Rex Gunderson, one of the ship’s senior petty officers. “Back to Groundhog Day.”