The Montgomery County Board of Education followed the recommendations of Superintendent Edward Andrews last night in voting to close two junior high schools and a middle school as an economy measure in the face of declining enrollment.

The closings next month of Argyle Junior High in Silver Spring, Leland Junior High in Chevy Chase and Broome Middle School in Rockville are the first steps in a plan that calls for closing another 31 schools over the next five years.

The three schools to be closed were chosen from a list of five that included E. Brooke Lee Junior High in Silver Spring and Western Junior High in Bethesda. The board heard loud protests against closings from parents in the affected areas.

The board committed itself to closing three junior highs or middle schools earlier this year by eliminating nearly $1 million in operating funds from the budget for the next school year. It still must decide on Andrews' proposal to close Brookview Elementary School next month.

The closing recommendations are based on a 15-year master plan for educational facilities completed last week by school officials. The 700-page document analyzes use of the county's 173 schools in view of a further expected decline of 20,000 students from the current 98,000 in the next 10 years.

Blair Ewing was the only school board member to vote against all three closings. "I felt it was the wrong time and the wrong way to do it," he said. "The time frame has been too short and the communities have been denied due process in the most blatant kind of way."

The Leland and Broome buildings will be turned over to the county government, while Argyle will be retained in school ownership for two years while presumably being used by the county for office space. School board member Eleanor Zappone made the motion to retain the Argyle property because community members argued that growth in their area may necesitate use of the facility for a school again.

The long-range program of school closings, based on population and building condition projections, includes the first two high schools named for closure -- Northwood and Robert E. Peary. The bulk of the closings are recommended for June 1982.