First Maryland Bancorp may not retain as much independence as officials of the Baltimore-based bank holding company suggested it would if Allied Irish Banks Ltd. succeeds in acquiring a majority of its stock.

An examination of a stock purchase agreement, which the two companies filed at the Securities and Exchange Commission, indicates that AIB will have a major say--if not veto power--in important policy decisions at First Maryland for at least 10 years after the pact becomes effective.

First Maryland announced last month that it had reached an agreement with Ireland's biggest banking company, paving the way for AIB to acquire a majority interest in First Maryland and its principal subsidiary, First National Bank of Maryland.

Assuming approval is granted, AIB would acquire about 43 percent of First Maryland this year and increase its interest to as much as 60 percent during the succeeding four years.

AIB's investment is to be made through a combination of purchases from existing stockholders and through new stock to be issued by First Maryland. AIB plans to make a tender offer for 1.8 million shares at $35 each.

First Maryland officials, describing the relationship with AIB as a "good fit" in explaining the deal last month, hastened to emphasize that Maryland's second largest bank holding company would retain its independence.

"We retain our independence," a First Maryland official noted. "We retain our name; we retain our management."

Indeed, First Maryland would develop plans for continued growth in the region, an AIB official added. That would be in line with AIB's desire, he explained, to continue present management at First Maryland.

But it remains to be seen just how much control First Maryland's management will have. And although First Maryland's announcement contained assurances that several executives would receive employment agreements, no specifics were disclosed.

While certain provisions of the agreement stipulate that key executives of First Maryland and its principal subsidiary will have employment contracts, they aren't altogether clear about the composition of management beyond the first eight years of AIB's control.

In a section devoted to management, the agreement calls for the retention of First Maryland Chairman J. Owen Cole and President Charles W. Cole Jr. at their current salaries, with normal increases for eight years. Four other key executives would be retained under employment contracts for five years.

Although AIB has expressed its desire to maintain First Maryland's management, future appointments to the position of chief executive of First Maryland and First National Bank of Maryland "shall require the prior written approval of AIB," the agreement states. AIB's approval won't be "unreasonably withheld," however, the agreement continues.

Nonetheless, the agreement contains no reference to job guarantees beyond the terms specified for any of First Maryland's executives.

Elsewhere in the document, the parties have agreed to a provision calling for First Maryland to accept some AIB employes, "at least one of whom may be a senior officer directly responsible to the chief executive officer of FMB and who shall be involved in all major activities of FMB." That provision covers the 10 years following the effective date of the agreement.

In announcing the agreement, First Maryland acknowledged that it will have a representative on AIB's board and that four persons from AIB would serve on First Maryland's board.

The agreement itself states, however, that persons designated by AIB may be appointed to the boards of First Maryland's banks and other subsidiaries.

AIB would also have the right to request that First Maryland appoint at least one of AIB's director-nominees to committees of First Maryland subsidiary boards.

Moreover, while there are no plans to exercise the right, AIB could designate nominees to serve on First Maryland's board in direct proportion to AIB's stock holdings.

Conceivably, AIB could eventually control First Maryland's board if its holdings reach 60 percent in the Baltimore banking firm.