Negotiators are close to an agreement to sell Washington's third-largest banking company, Financial General Bankshares Inc. to a group of Middle Eastern investors for more than $160 million, The Washington Post has learned.

The agreement, which could be completed as early as this weekend, would end a two-and-a-half year fight for control of the company that owns the First American banks here as well as other financial institutions.

Sources close to the negotiations say both sides have agreed on the price the Middle Eastern group will offer for Financial General's stock.

The talks are now focusing on technical details that appear unlikely to prevent a final agreement, sources said.

Lawyers for Financial General and the Middle Eastern group both refused to comment on the talks yesterday. Members of Financial General's board of directors have been ordered by the attorneys not to discuss the negotiations.

Financial General now is controlled by a group headed by Chairman B. F. Saul II, the prominent Washington real estate man and G. William Middendorf, the company's president.

The buyers of the bank are lead by Sheikh Kamal Adham, former chief of intelligence for Saudi Arabia and an adviser to the Saudi royal family. Adham's associates include Abdullah Darwaish, who manages the finances of the royal family of Abu Dhabi and Faisal Saud al-Fulaij, a prominent businessman from Kuwait.

Adham's group bought about 20 percent of Financial General's stock in December of 1977, but has been prevented from buying more stock by a series of legal maneuvers by the company.

Yesterday Financial General disclosed that 46 percent of the company's shareholders voted in favor of a resolution proposed by Adham urging the company to end its opposition to the takeover.

While 53 percent of the shareholders voted against the proposal, the margin of victory was so small that the company is continuing negotiation.

The outcome of the vote could have been reversed if one Financial General boardmember, Dr. Armand Hammer had voted with Adham rather than with Saul, sources familiar with the vote said.

Hammer, the chairman of Occidental Petroleum Corp., owns about 5.4 percent of the stock and for months has urged Saul and Adham to make peace. Settlement has also been called for by Eugene B. Casey of Gaithersburg, who owns nearly 10 percent of the stock.

On Hammer's initiative, the two sides began negotiations last month and almost settled the dispute before Adham's resolution came to a vote at the company's annual meeting April 30.

It took until yesterday to get a final count on the votes, and during the two weeks there has been a series of negotiating sessions.

The proposal now on the table calls for Adham and his associates to make a public offering of $28.50 a share for Financial General's common stock, which has traded recently for around $21.37 a share. When the Adham group first invested in Financial General, it paid less than $15 a share for the stock. Subsequently the offer has been raised to $20 and then $25 a share.

Because it could take months or even years to remove all the legal roadblock to the sale, the offer reportedly includes provisions to adjust the price upward if the underlying value of the Financial General banks increases.

Financial General is a $2.3 billion bank holding company based in Washington.