Alex Haley agreed to pay a Bethesda, Md., author about $500,000 today and publicly expressed regred that portions of a 1967 novel called "The African" had "found their way" into Haley's best-selling book, "Roots."

The out-of-court settlement came in a copyright infringement suit brought by Harold Courlander of Bethesda in U.S. District Court here.

Haley testified last month that although he had not read "The African" before writing "Roots," three brief passages from Courlander's work had been inadvertently incorporated in Ahley's work.

Haley said this occurred because he helped to support himself by lecturing during the 12 years he worked on "Roots," and often members of the audience would pass him slips of paper with suggestions. He said he dumped these in a carton and used some of them without knowing their source.

Courlander's suit cited 81 mostly brief passages allegedly similar to his novel and asked for half the profits from "Roots." Haley's lawyer and publisher delcined to estimates his earnings from "Rotts," but his royalties had topped $2.6 million on hardcover sales before the paperback appeared.

Courtroom sources placed the amount of the settlement at approximately $500,000. Haley spent the afternoon on an airplane and could not be reached for comment. Courlander refused to reveal the amount, citing a pledge of secrecy made by both sides as part of the settlement.

"Roots" won the Pulitzer Price and was a successful television series. Haley flew to Los Angeles immediately after today's settlement to tape a preview for a second ABC-TV miniseries based on his second book about his roots, his lawyer said. Haley was paid $1 million for the second series, ABC officials have said.

Courlander, 70, who has written about 30 books, earned $14,000 when "The African" was first published and another $14,000 after it was republished following the success of Roots."

Before the defense presented its case, U.S District Cour Judge Robert Ward spent three dyas conferring with both sides, urging them to settle. He suggested a dollar figure at the time that a lawyer for Haley's publisher, Doubleday, said was so large it "would have the effect of saying to Doubleday that 'Roots' was copied substantially from 'The African.'"

From the beginning fo the trial, Ward expressed amazement that Haley-in 12 years of work-had not read "The African."

He questioned Haley's use of 'Yoo-hooo-ah-hoo" as a slave field call. The word appears with the same spelling in "The African."

Haley was questioned by Courlander's lawyer on all 81 passages cited in the suit. Among them:

From "The African": . . . but the hunter is not allowed to fortet. All his senses must be burning. He must hear what the farmer cannot hear. He must smell what others cannot smell . . . his eyes must pierce the darkness."

From "Rotts": " . . . The hunter's senses must be fine. He must hear what others cannot, smell what others cannot. He must see through the darkness."

From "The African": " . . . drifted into sleep . . . Hwesuhunu drifted into wakefulness again. He felt his father's presence in the darkness. He reached out his hand, but there was nothing there to be felt. He spoke aloud, saying, 'So it shall be, I understand. This is the meaning of things.'"

From "Roots": "One night when Kunte had fallen asleep but drifted again into wakefulness . . . he lay staring up into the darkness . . . feeling around him, in some strange way, the presence of his holy-man grandfather, Kunte reached out in the darkness. There was nothing to be felt, but he began speaking aloud to the Alquaran Kairaba Kinta Kunte, imploring him to make know the purpose his mission here . . . "

The complete statement made public today after a conference in Judge Ward's chambers said:

"The suit has been amicably settled out of court. Alex Haley acknowledges and regrets that various materials from 'The African' by Harold Courlander found their way into his book 'Roots.'"

Haley's extraordinary success with "Roots" has been accompanied by a series of problems.

A British writer, Mark Ottaway, followed the trail of "Roots" and disputed Haley's claim that his family had originated in the Gambia village Juffure.

Margaret Walker Alexander sued Haley, claiming "Roots" was largely copied from her novel "Jubilee" written in 1966. Haley won that suit in the same Manhattan District Court where whe settled with Courlander today.

Haley complained, however, that his successful defense cost him $100,000. "Even when I win, I lose," he said in an interview with the New York Daily News.

It was Haley's decision to settle. Lawyers for the other defendants, Doubleday ad Dell publishers, said their clients advised against the settlement and are not party to it although all actions against them are missed.

The litigious history of "Roots"includes a 1977 suit Haley Filed against Doubleday, claiming his publisher did not adequately promote the book and negotiated an unsatisfactory paperback sale. He asked for $5 million. In what seems to be a developing "Roots" pattern, that suit was settled and one of the settlement conditions was that neither side discuss its details.

Haley, 57, described on the witness stand his financial difficulties during the years he was writing "Roots."

"I had two alimonies to pay and I had tax problems and they were both very pressing and you have to deal with them or they will with you," he said.

Haley received $96,000 in advances from Doubleday between 1964 and 1976. He lectured frequently from 1968 on. It was during these lecture tours, Haley said, that people gave him passages on slavery they thought might be useful to his reasearch.

Courlander said yesterday that he had "never looked forward to becoming a millionaire out of my writing. I considered it an indulgence that satisfied me. As long as I had some publisher willing to print it and an audience willing to look at it, that was enough for me."

His first work to be produced professionally was a play called "Swamp Mud" that he wrote while attending the University of Michigan. It won him a drame prize in 1931 and was subsequently produced at the university and at a black theater in Cleveland.

The play was about black escapees from a Georgia chain gang and their reactions to their circumstances, according to Courlander. Courlander is not black and had never even been in Georgia, but black culture and traditions had always fascinated him, he said. In later life he would visit Africa, Cuba, Haiti, the Dominican Republic and the American South, where he would study balck culture and its survival as blacks moved from Africa to the west.

Courlander says he does not know where this interest first developed but recalls growing up in a "mixed neighborhood in Detroit . . . and having my first black friends there." CAPTION: Picture 1, ALEX HALEY . . . a litigious history; Picture 2, HAROLD COURLANDER . . . 81 passages cited