N.C. Gen. Stat. 126-43 (1981) provides that the Administrative Procedure Act applies to the State Personnel System and hearing and appeal matters before the Commission. Under the North Carolina Administrative Procedure Act, section 150A-51 governs scope of review. This statute in pertinent part reads:
The court may affirm the decision of the agency or remand the case for further proceedings-, or it may reverse or modify the decision if the substantial rights of the petitioners may have been prejudiced because the agency findings, inferences, conclusions, or decisions are:
(3) Made upon unlawful procedure; or
(4) Affected by other error of law; or
(5) Unsupported by substantial evidence admissible under G.S. 150A-29(a) or G.S. 150A-30 in view of the entire record submitted; or
(6) Arbitrary or capricious.
N.C. Gen. Stat. 150A-51 (1983) (Although Chapter 150A has been rewritten and recodified, 1985 N.C. Sess. Laws, c. 746, s. 19 pro*242vides that the act shall not affect contested cases commenced before 1 January 1986.).
In the case at bar the superior court did find that Mr. Tolli-ver’s rights may have been prejudiced by agency findings, conclusions, and decisions made upon unlawful procedure, affected by error of law, unsupported by substantial evidence, and that were arbitrary or capricious. The court supported its conclusion with a list of eleven findings of procedural and substantive error. After thorough review of the record, we conclude that the agency’s finding was properly reversed and remanded for rehearing in accordance with the statute.
Affirmed.
Chief Judge Hedrick and Judge Arnold concur.