McCormick & Co. yesterday announced an agreement in principle to acquire the Spice Islands line of spices, herbs and vinegars from Specialty Brands Inc. of San Francisco, a move that would give the Hunt Valley, Md., company control over a major competitor in the spice business.

Terms of the transaction were not disclosed. The deal is subject to government approval and a definitive agreement.

Total revenue of the Spice Islands line was $30 million in 1987.

McCormick & Co. is a seasonings, flavorings, specialty foods and real estate company that markets its products in the east under the McCormick label and in the west under the Schilling label.

"This proposed acquisition is in keeping with our goal to expand our ability to offer consumers a full range of quality seasoning and flavoring items," President Charles P. McCormick Jr. said in a statement.

Michael Riehl, a stock analyst who follows McCormick, speculated that the proposed deal could run into federal antitrust objections, but a company spokesman said, "we are very optimistic about our chances" for approval.

Separately, McCormick reported net income of $30.6 million ($2.59 per share) for the fiscal year ended Nov. 30, up 3 percent from $29.7 million ($2.46) in the same period of 1986.

Sales increased 11 percent, to $1.1 billion from $976 million.

In the fourth quarter of 1987, net income dropped 16 percent to $14.7 million ($1.24) from $17.5 million ($1.45). Sales rose 10 percent to $324 million from $294 million a year earlier, the company said.

Maryland Federal Savings and Loan Association of Hyattsville reported net income dropped 12.7 percent in the third quarter ended Nov. 30, to $861,000 (31 cents) from $986,000 in the same period of 1986.

There is no comparable per-share figure for 1986 because the association converted to public ownership in June 1987.

Net income for the first nine months of the year was $2.2 million (57 cents), compared with $2.3 million in the same period of 1986.

Although the association has been increasing its loans, it attributed the decline in earnings to a decline in fee income booked under federal accounting rules.

In the third quarter, income from loan origination and commitment fees dropped 96.5 percent to $22,000 from $631,000, the S&L said.