Years of controversy and a three-hour impassioned debate yesterday ended when the American Institute of Architects (AIA) voted to change its rules on ethics to permit its member architects to work as contractors as well as architects.

The three-to-one vote (1,505 to 528) came at the national AIA convention meeting here. The relaxation of the rules was limit to a three-year trial period. More than half the nation's architects are members of the AIA.

Opponents of the proposal claimed the new ruling would profoundly change the relationship of the client, the architects and subcontractors.Traditionally the architect, after designing the project, has often acted as the client's agent in supervising the contractor's work.

Jerome Cooper of Atlanta, a Fellow of the AIA, opposed a rule change in 1977 but was one of the three-member task force that put together the compromise setting the trial period. He said he still believed that the world is too complex for the architect "to return himself to the once-hallowed, sometimes mythical position of the master builder,"

The proponents of the measure claimed that the new ruling would give the architect greater control of the actual execution of his design to the greater benefit of the client. Former AIA president John M. Mcginty of Houston, an AIA fellow, expressed the position of the majority, saying, "It is an opportunity for us to extend professionalism and discipline of architecture beyond paper and into the execution of the design as well."

Others worried that the change would make architecture less a profession and more of a business producing a product, and would increase the architect's legal liability. A great deal of the pressure for the rule change came from an increased work force of architects looking for a way to expand opportunities for the profession.

The new ethics rule specifies certain safeguards for the clients: written disclosure of the potential conflict of interest and notice that the architect can profit or lose on the labor and material of the job; an admonition that the architect must exercise an unprejudiced professional judgement; that the client is entitled to know the contents of any contract that the architect makes; and that the owner shall be fully informed of the cost and consequences of any change or substitute and must approve it.

The effect of the new ruling is to be monitored for three years to determine how many architects will go into construction; the effect on the membership and whether it increases liability insurance costs. Today the convention will vote on whether or not architects will be allowed to advertise.