ABOARD THE USS WASP — It has wound a tortured path to get here. The F-35 Joint Strike Fighter has been derided as a trillion-dollar boondoggle, the “plane that ate the Pentagon,” a failed project billions over budget and years behind schedule that should be killed.

And yet here it was Tuesday, the sun glinting off its wings on a beautiful day as it approached this amphibious assault ship for a landing 100 miles off the North Carolina coast. It nestled in undaunted, touching down vertically like a helicopter onto the deck. Crews rushed around in a well-scripted choreography, getting ready to usher it off the ship again. And with the pilot’s salute from the cockpit, and a thunderous rush toward the horizon, it was off again over the deep blue water.

For the Marine Corps, the flights the F-35s have been taking around the USS Wasp for the past week have been as much a victory lap as they were training exercises. And in the days ahead, as the stealthy fighter jets begin their first operational tests from a ship — tactical exercises designed to simulate Top Gun-like engagements — the Marine Corps will move one step closer to declaring that the F-35 is ready for combat.

When exactly that day will come is still uncertain; the Marines are pushing to have an initial fleet of 10 planes ready to fight sometime in July. And there is still more testing, inspections and nit-picking to be done for the $400 billion program.

But after years of delays and setbacks, after the ridicule of what must be the Pentagon’s most embattled program, Marine Corps officials say that day will come for their variant of the plane, the F-35B — and soon.

“By all accounts, it was a great success. No show stoppers at all,” Lt. Gen. Jon Davis, the Marine Corps deputy commandant for aviation, said of the testing over the past week.

The program is “building momentum and a very good momentum, and I see very little to discourage me.”

Although Davis previously had told reporters that he’d rather not deploy the F-35B to a combat situation right away in order to give the program more time to develop, he was more resolute Tuesday.

“If the nation calls and the situation warrants, we will be able to deploy that aircraft into combat guaranteed,” he said.

The F-35, built by Bethesda-based Lockheed Martin, comes in three versions, for the Marine Corps, the Navy and the Air Force. The Air Force’s variant is expected to be declared ready for combat sometime late next year. The Navy’s variant is scheduled for that in late 2018 or early 2019.

While Pentagon officials say the program is largely back on track, there continue to be problems with the software of the plane, which is often referred to as a flying computer. Most recently, there were problems with the software that gathers information, such as targets, the location of the enemy, and then shares it among the F-35s flying together in formation.

If two jets are flying together, they can share the information without a problem. But when there are more flying together, the problems occur, which can “create an inaccurate picture for the pilot,” said Air Force Lt. Gen. Christopher Bogdan, the joint program executive officer.

And last summer, an engine fire forced the Pentagon to temporarily ground the entire fleet while investigators figured out what went wrong.

Pentagon officials warned that as it moves from developmental testing to operational tests, which are designed to simulate combat, there will be additional issues that will have to be resolved, officials said.

But as the Marines took off and landed against a clear blue sky Tuesday — they have flown about 100 sorties during the testing so far — there seemed no evidence of any problems. And the Marine pilots who had spent a week flying it day and night over the Atlantic said they were happy with the way the plane was performing.

For the branch of the service that views itself as the tip of the spear, with a motto of “first in, last out,” the Marines’ decision to declare the plane combat ready will, Davis said, “allow it to be not only the first to fight but the first choice for the first to fight.”