SAN DIEGO (AP) _ Capt. Will C. Rogers III ended his two-year command of the USS Vincennes on Saturday without apology for the cruiser's mistaken destruction of an Iranian airliner and with a call to combat terrorism.

Navy Capt. Robert B. Lynch took over as the new commander of the Aegis cruiser that Rogers defended as ''a masterpiece of American technology and ingenuity,'' despite past criticisms.

Rogers made no mention of the airliner's destruction July 3, 1988, instead focusing on a pipe bomb attack last March that destroyed a van driven by his wife, Sharon, as she drove to work. Mrs. Rogers escaped injury.

The van bombing remains under investigation by the FBI as a possible act of terrorism.

Rogers, speaking to a crowd of about 200 aboard the heavily guarded ship, denounced terrorism, saying it is a ''subterranean and shadowy war'' that ''preys on a lack of courage and enlists those without moral conviction.''

The Vincennes was engaged in combat with seven Iranian patrol craft when it misidentified the Iranian jetliner as an attacking military aircraft and fired at it. All 290 aboard the jet died.

Rogers, who took command of the Vincennes in April 1987, defended the Aegis electronic combat control system, which enables a ship like the Vincennes to make computer-recommended battle decisions for entire fleets.

But the system was found flawed in the Persian Gulf confrontation. According to Pentagon analysts, split-second decisions were affected by the inability of radar-scope interpreters to immediately match the plane's ''blip'' with digital direction, altitude and speed information displayed on another screen.

The Vincennes will be moved to Long Beach Naval Shipyard within five weeks for modifications of its electronic combat control system, The (San Diego) Tribune reported.

During the ceremony, Rogers was commended by Vice Adm. Robert K.U. Kihune, who presented him with the Legion of Merit.

''There are very few officers in our ranks who have been faced with the challenges of command that Capt. Will Rogers has had to face,'' Kihune said.

''I can state today, without any exaggeration, that Capt. Rogers has met every test and has moved on to instill pride in his men and to command his warship with true professionalism.,'' Kihune said.

Rogers' new assignment is at the Navy's Tactical Training Group on Point Loma, which trains senior naval officers in handling close-combat situations. He and his wife are under a Naval Investigative Service guard that has been in place since the van bombing.

The Vincennes, which was commissioned in 1984, is expected to leave San Diego for a routine six-month deployment to the Far East and Indian Ocean in early December.