Lawrence E. Walsh, the special prosecutor who spent six years investigating misconduct by President Ronald Reagan administration officials in the Iran-Contra affair, has died. He was 102.

His death was confirmed Thursday by two former aides, Guy Struve and Mary Belcher.

In a distinguished legal career, Walsh was a highly successful Wall Street lawyer who served as a federal judge, president of the American Bar Association and as the No. 2 official at the Justice Department in the Eisenhower administration.

But the highest profile work of his life was as a court-appointed independent counsel in the Iran-Contra controversy, when he relentlessly pursued evidence of wrongdoing in an investigation that cost $47 million. Walsh's detractors said the investigation was a clear case of prosecutorial abuse.

The drama of Iran-Contra paled in comparison with the Watergate scandal that brought down President Richard M. Nixon. But both scandals were Washington spectacles: a political collision of the executive and legislative branches of government, televised congressional hearings, a presidency in peril, an alleged criminal cover-up and a series of criminal prosecutions that were, in the Iran-Contra affair, all overseen by Walsh.

"I found myself at the center of a constitutional maelstrom," Walsh recalled in his 1997 book, "Firewall: The Iran-Contra Conspiracy and Cover-up."

"While struggling to learn the truth and unravel a willful cover-up that extended all the way to the Oval Office, my staff and I had to fend off attacks from members of Congress and the president's Cabinet and to break through the barriers erected by the national security community," Walsh wrote.

Iran-Contra had its roots in two covert operations directed from the Reagan White House. In both, Congress was kept in the dark.

The first operation was the secret supplying of weapons to rebels in Central America who were seeking to overthrow the leftist government of Nicaragua. At the time, Congress had barred the CIA and the Pentagon from providing military aid to the Contra rebels.

The second operation was the secret sale of anti-tank missiles and spare parts for Hawk anti-aircraft missiles to Iran in an effort to free U.S. hostages held in Lebanon. Iran, which at the time was fighting a war with Iraq, was thought to possess some influence over the abductors.

The White House linked the two operations by secretly diverting millions of dollars from the Iran arms sales into buying guns for the rebels in Central America.

A political firestorm erupted when the diversion was exposed in late 1986. That left the Reagan administration with little choice but to call for a criminal investigation by a wholly independent prosecutor. A panel of three federal appeals judges chose Walsh.

Eleven people pleaded guilty or were convicted by juries in Iran-Contra. But the two biggest courtroom victories for Walsh's prosecutors -- convictions of national security adviser John Poindexter and former Marine Lt. Col. Oliver North -- were overturned on appeal.

Over Walsh's strenuous objections, Congress had granted North and Poindexter limited immunity from prosecution in exchange for both men's testimony in nationally televised hearings. The congressional immunity deals eventually spelled the death knell for both criminal cases.

The biggest case of all, that of Defense Secretary Caspar Weinberger, never came to trial because President George H.W. Bush pardoned the defendant and five other Iran-Contra figures on Christmas Eve of 2002, two weeks before Weinberger's trial was to start.

The pardons infuriated Walsh.

"The Iran-contra cover-up, which has continued for more than six years, has now been completed," Walsh said at the time.

The pardons demonstrated that "powerful people with powerful allies can commit serious crimes in high office -- deliberately abusing the public trust without consequence," he said.

In the end, the Iran-Contra probe cost $47 million and resulted in just one person being sent to prison -- a retired CIA officer who helped deliver weapons to the Contras.

Walsh was born in 1912 in the Canadian province of Nova Scotia. His family moved to New York City when he was a small child. He graduated from Columbia University in 1932 and earned his law degree there in 1935.

As a young prosecutor in the office of racket-busting New York District Attorney Thomas Dewey, Walsh and the rest of Dewey's team of aggressive lawyers took on organized crime in the city. When Dewey was elected governor, Walsh appointed him his assistant legal counsel.

In 1953, Dewey named Walsh general counsel to the waterfront commission, where he helped clean up crime on the New York and New Jersey docks, a battle that first brought him to widespread public attention.

In 1954, President Dwight D. Eisenhower appointed Walsh to a federal judgeship.

Three years later, as the civil rights movement gained momentum, Walsh was appointed the Justice Department's deputy attorney general and given the responsibility of overseeing the continued desegregation of public schools after military forces had been withdrawn from Little Rock, Ark.

Walsh was a principal draftsman of the Civil Rights Act of 1960, which provided for the appointment of referees to help African Americans register to vote.

After Democrat John F. Kennedy defeated Nixon for president in 1960, Walsh returned to private practice.

For the next 20 years, Walsh mostly specialized in litigation for corporations such as AT&T and General Motors. But he did take on some special assignments for both state and federal governments.

In New York, Gov. Nelson Rockefeller named him chairman in 1963 of a commission to investigate misconduct in the liquor industry.

In 1969, Nixon appointed Walsh as his personal representative and deputy of the U.S. delegation to the Paris meetings on Vietnam in the preliminary efforts to end the conflict.

President Jimmy Carter asked him to serve as chairman of a committee for the recommendation of U.S. Court of Appeals nominees. By 1981, Walsh had moved to Oklahoma City, his wife's hometown, where he continued to practice law.