
499 S.E.2d 187 (1998)
347 N.C. 602
NORTH CAROLINA DEPARTMENT OF TRANSPORTATION
v.
Glenn I. HODGE, Jr.
No. 559PA96.
Supreme Court of North Carolina.
March 6, 1998.
*188 Michael F. Easley, Attorney General by Grayson G. Kelley, Special Deputy Attorney General; Robert O. Crawford, III, Assistant Attorney General; and Sarah Ann Lannom, Associate Attorney General, for respondent-appellee Department of Transportation.
John C. Hunter, Asheville, for petitioner-appellant Hodge.
FRYE, Justice.
Both this and a companion case, Powell v. N.C. Dep't of Transp., 347 N.C. 614, 499 S.E.2d 180 (1998) (opinions filed simultaneously), raise the issue of whether the Governor properly designated certain State employee positions as policymaking exempt under N.C.G.S. § 126-5.
In this case, we must determine whether the Court of Appeals erred in reversing an order of the superior court sitting in review of a final decision of a state agency. We conclude that the Court of Appeals did err.
The specific issue in this case is whether the position of Chief of the Internal Audit Section of the Department of Transportation (DOT) comes within the statutory definition of policymaking and may therefore be designated as exempt from provisions of the State Personnel Act (SPA).[1] The SPA permits the Governor to designate as exempt certain policymaking positions within departments of state government, including the DOT. N.C.G.S. § 126-5(d)(1) (1995). A policymaking position is defined as "a position delegated with the authority to impose the final decision as to a settled course of action to be followed within a department, agency, or division." N.C.G.S. § 126-5(b).
Glenn I. Hodge, Jr., was employed by the DOT as an internal auditor beginning 1 January 1992. On 23 May 1992, Hodge was promoted to the position of Chief of the Internal Audit Section. In March 1993, under the direction of the Governor's office, a panel of personnel officials compiled a list of positions within the DOT which could be designated as policymaking exempt pursuant to N.C.G.S. § 126-5(d)(1).[2] Hodge's position was included on this list. On 12 February 1993,[3] and again on 3 May 1993, Hodge was notified by letter that his position was to be designated as policymaking exempt and that he would thereafter serve at the pleasure of the Secretary of the DOT. Hodge filed petitions for contested case hearings in the Office of Administrative Hearings on 15 March 1993 and 14 May 1993, challenging the designation of his position as policymaking exempt. The cases were consolidated for hearing.
*189 A contested case hearing was held before Senior Administrative Law Judge (ALJ) Fred G. Morrison, Jr., in November 1993. The evidence presented showed that the position of Chief of the Internal Audit Section of the DOT had considerable independence to direct and supervise audits inside the DOT. The person in this position had supervisory authority within the section over other auditors' work and assignments. The Chief of the Internal Audit Section consulted with the heads of units being audited and with higher-ranking DOT officials and made recommendations for changes based on the results of audits. The decisions made by the person in this position potentially had an impact on policies within the DOT. Importantly, however, the evidence also showed that the Chief of the Internal Audit Section had no inherent or delegated authority to implement recommendations or order action based on audit findings.
ALJ Morrison issued a recommended decision reversing the DOT's designation of Hodge's position as exempt. The ALJ made, inter alia, the following contested finding of fact:
3. As Chief of the Internal Audit Section, the Petitioner [Hodge] exercised broad flexibility and independence. In addition to supervising other auditors, he could decide who, what, when, how, and why to audit within the Department. While he could not order implementation of any recommendations, he was free to contact the State Bureau of Investigation concerning his findings.
The ALJ also found that designation of the position as policymaking exempt was the substantial equivalent of being dismissed and that DOT officials had made no finding that a political confidant of the Governor was needed for the effective performance of this office (finding of fact number 5). Finally, the ALJ found that Hodge's responsibilities included auditing federally funded transportation programs and that applicable federal rules and audit standards require that auditors be free from organizational or external impairments in order to insure objectivity and independence (finding of fact number 6).
The ALJ concluded that the purpose of N.C.G.S. § 126-5(d)(1) is to "allow the Governor to make partisan personnel decisions in order to have loyal supporters who will carry out administration policies." Citing Branti v. Finkel, 445 U.S. 507, 100 S.Ct. 1287, 63 L.Ed.2d 574 (1980), the ALJ stated that when employees challenge these political decisions, the "ultimate inquiry" is whether the hiring authority can demonstrate that party affiliation is an appropriate requirement for the effective performance of the office involved. The ALJ concluded that "this standard must be followed when positions are declared policymaking exempt from the State Personnel Act" and that it had not been followed in this case.
By a decision and order entered 22 November 1994, the State Personnel Commission (Commission) adopted the ALJ's findings of fact and conclusions of law as its own and ordered that designation of the position as policymaking exempt under N.C.G.S. § 126-5(d) be reversed. The DOT objected to the above findings of fact and conclusions of law, and to the final decision and order of the Commission, and petitioned for judicial review. On 6 September 1995, Judge Donald W. Stephens affirmed the Commission's decision and order.
The Court of Appeals reversed the superior court order, deciding that the Commission erred by applying an incorrect legal standard and that the superior court, in turn, erred by concluding that the Commission's decision was not affected by an error of law. The Court of Appeals held that the Commission's findings, as supported by substantial record evidence, could "only support the legal conclusion that Hodge's position was properly designated as policymaking exempt" and that the superior court erred by affirming the contrary conclusion reached by the Commission. N.C. Dep't of Transp. v. Hodge, 124 N.C.App. 515, 520, 478 S.E.2d 30, 32 (1996). The case was remanded with the mandate that the position of Chief of the Internal Audit Section be designated as policymaking exempt. On 7 March 1997, this Court allowed Hodge's petition for discretionary review.
*190 Whether the position of Chief of the Internal Audit Section of the DOT was properly designated as exempt under N.C.G.S. § 126-5(d)(1) first requires a determination of whether the position met the statutory definition of policymaking under N.C.G.S. § 126-5(b). After an examination of the entire record, we conclude that it did not. Therefore, it was unnecessary in this case for the ALJ to reach the question of the constitutional definition of policymaking under the Branti v. Finkel decision.
Substantial evidence presented by both parties showed that the position of Chief of the Internal Audit Section carried considerable independence and responsibility. However, this is not sufficient to make it "a position delegated with the authority to impose the final decision as to a settled course of action to be followed within a department, agency, or division." N.C.G.S. § 126-5(b). As defined in N.C.G.S. § 143B-11, a division is the principal subunit of a department, and a section is the principal subunit of a division. The Court of Appeals correctly recognized that, "[c]ontrary to the DOT's assertions, the record does not show that, as Chief Internal Auditor, Hodge headed a division within the DOT." Hodge, 124 N.C.App. at 519, 478 S.E.2d at 32. Even after a departmental reorganization in February 1993, the Internal Audit Section did not function as a division of the DOT. While we emphasize that the statutory definition of policymaking does not require that the person holding the position actually head a department, agency, or division, he or she must nonetheless have the authority to impose a final decision as to a settled course of action to be followed at the department, agency, or division level.
As noted above, Hodge, as Chief Internal Auditor, could recommend action on audit findings, but the decision to implement changes based on those recommendations or findings rested with the head of the audited unit and the Secretary of the DOT. Hodge had no authority to "impose" a final decision as to a settled course of action within the DOT or any division of the DOT, and his authority at the section level did not rise to the level of authority required by N.C.G.S. § 126-5(b) to be considered policymaking. The substantial evidence in the record amply supports a finding that the Chief of the Internal Audit Section had final decision-making authority within that section but did not have final decision-making authority to impose a settled course of action to be followed within a department, agency, or division. We hold that the Court of Appeals erred to the extent that it held that the Commission's findings, as supported by substantial record evidence, compelled a conclusion that the position was properly designated as policymaking exempt.
In summary, the Commission adopted the ALJ's findings of fact and conclusions of law, which were based unnecessarily upon constitutional standards that consider when political affiliation is an appropriate factor in determining which positions are policymaking. This was not the proper legal question and need not have been reached, if at all, until a determination was made as to whether the position met the definition of policymaking under N.C.G.S. § 126-5(b). Nonetheless, the Commission's final decision, that the position of Chief Internal Auditor was not policymaking, was correct based on an application of the statutory definition alone. Accordingly, we reverse the Court of Appeals as to this issue.
Because the Branti standard was prematurely applied by the Commission and the statutory definition of policymaking decides the case, we do not address the issue of whether the superior court erred in denying the DOT's motion to remand to the ALJ to present additional evidence in accordance with that federal standard.
For the foregoing reasons, we reverse the decision of the Court of Appeals.
REVERSED.
MITCHELL, Chief Justice, dissenting.
I conclude that the Court of Appeals was correct in reversing the Superior Court. The State Personnel Commission erred by applying an incorrect legal standard. Therefore, the Superior Court, in turn, erred by concluding that the Commission's decision was not affected by an error of law.
*191 It is clear from the record on appeal that the Commission never considered the only issue raised by the parties. Instead, the Commission rendered its decision entirely upon grounds not raised by either party and not properly before the Commission.
In his petition for a contested case hearing, petitioner Glenn I. Hodge, Jr., stated that "[t]he facts supporting my appeal are: The Respondent [Department of Transportation] has designated the Petitioner's position as a `policymaking position' under NCGS 126-5. Petitioner's position is not a `policymaking position' as defined in NCGS 126-5(b)." (Emphasis added.) Everything in the record on appeal emphasizes that neither petitioner Hodge nor respondent Department of Transportation (DOT) considered this case to in any way involve questions of party affiliation or political discrimination. In fact, the prehearing order entered into by the parties and signed by the Administrative Law Judge (ALJ) recites that the parties "stipulated and agreed that the issue to be resolved" during the contested case hearing was as follows: "Was Petitioner's position as Chief of the Internal Audit Section in the Department of Transportation properly designated by Respondent as a policymaking exempt position in accordance with all the provisions of North Carolina Gen.Stat. 126-5[?]" (Emphasis added.) However, during counsel's opening statements at the contested case hearing, the ALJ specifically asked whether DOT must establish the need for a "political confidant" of the Governor in the position of Chief of the Internal Audit Section of DOT, which Hodge had held. Counsel for DOT replied that the parties had agreed that "the definition that the General Assembly has now set out for policy-maker doesn't really speak to politics. It speaks to authority level." Counsel for petitioner Hodge agreed that the ALJ was "not being called upon today to rule on a political discrimination case." Additionally, the ALJ declined to allow DOT to offer any evidence during the contested case hearing concerning the political affiliation and partisan activities and statements of petitioner Hodge during the time he held the position in question or evidence concerning the partisan political nature of Hodge's hiring for the position.
Despite the above referred to stipulation and statements of counsel for both parties, the ALJ entered a recommended decision that failed to address the stipulated issue and dwelled almost exclusively on considerations relating to partisan politics. The findings and conclusions in that recommended decision are as follows:
Based on a preponderance of the substantial evidence admitted into the record of this case, the Administrative Law Judge makes the following:

FINDINGS OF FACT
1. Governor James G. Martin, a Republican, served as Governor of North Carolina from January of 1985 to January of 1993. During those years the position of Chief-Internal Audit Section of the Department of Transportation was not exempted from the provisions of the State Personnel Act.
2. Petitioner Glenn I. Hodge Jr., a Republican, began his employment with the State of North Carolina on January 1, 1990, at Pay Grade 71, in the Department of Human Resources. He transferred to the Respondent on January 1, 1992, as an internal auditor at Pay Grade 71. On May 23, 1992, Petitioner was promoted to the position of Chief-Internal Audit Section at Pay Grade 78.
3. As Chief of the Internal Audit Section, the Petitioner exercised broad flexibility and independence. In addition to supervising other auditors, he could decide who, what, when, how, and why to audit within the Department. While he could not order implementation of any recommendations, he was free to contact the State Bureau of Investigation concerning his findings.
4. Governor James B. Hunt, Jr., a Democrat, was elected in 1992 and began serving in January of 1993. He had previously served as Governor from January of 1977 until January of 1985, during which time the subject position was designated as exempt from the provisions of the State Personnel Act.

*192 5. During the early part of 1993, Respondent's officials recommended that the Petitioner's position be designated as exempt because of the nature and duties of the job. They thought it met the statutory definition of policymaking. No finding was made that a political confidant of the Governor was needed for the effective performance of this office. Upon being notified of the Governor's designation of his position as exempt, the Petitioner requested an investigation by the Office of State Personnel after which he filed petitions for contested case hearings pursuant to G.S. § 126-5(h). The designation of Petitioner's position as policymaking exempt was the substantial equivalent of his being dismissed by Respondent.
6. Under various agreements and arrangements with the United States Department of Transportation, Petitioner's responsibilities include the auditing of federally funded transportation programs and activities. Applicable federal rules and audit standards require that auditors of federally funded activities be free from organizational, external or other impairments to assure individual objectivity and operational independence in presenting opinions, conclusions, judgments and recommendations. The standards provide that auditors should be "sufficiently removed from political pressures to insure that they conduct their audits objectively and can report their findings, opinions and conclusions objectively without fear of political repercussion. Wherever feasible, they should be under a personnel system in which compensation, training, job tenure and advancement are based on merit."
Based on the foregoing Findings of Fact, the Administrative Law Judge makes the following:

CONCLUSIONS OF LAW
1. G.S. 126-5(d)(1) allows the Governor to designate certain positions as exempt policymaking. The purpose is to allow the Governor to make partisan personnel decisions in order to have loyal supporters who will carry out administration policies. G.S. 126-5(c) and (h) allow employees in these positions to challenge such designations. The North Carolina Supreme Court reiterated in Abels v. Renfro Corp., 335 N.C. 209, 218[, 436 S.E.2d 822, 827] (1993), that "it would [`]look to federal decisions for guidance in establishing evidentiary standards and principles of law to be applied in discrimination cases.[']" [ (Quoting] Dept. of Correction v. Gibson, 308 N.C. 131[, 136, 301 S.E.2d 78, 82 (1983)) ].
2. The Supreme Court of the United States ruled in Branti v. Finkel, 445 U.S. 507, [518, 100 S.Ct. 1287, 1295, 63 L.Ed.2d 574, 584 (1980),] that when employees challenge these political decisions, "... the ultimate inquiry is not whether the label [`]policymaker[`] or [`]confidential[`] fits a particular position; rather, the question is whether the hiring authority can demonstrate that party affiliation is an appropriate requirement for the effective performance of the public office involved." It is my conclusion that this standard must be followed when positions are declared policymaking exempt from the State Personnel Act, which was not done in this case. Respondent has not shown why a political confidant is a necessary requirement in this position. Branti states "[i]t is equally clear that party affiliation is not necessarily relevant to every policymaking or confidential position." [Id.]
3. Reversal of the designation of this position is in order pursuant to G.S. 126-5(d)(6) which states: "Subsequent to the designation of a policymaking position as exempt ... the status of the position may be reversed ... by the Governor ... in a letter to the State Personnel Director, the Speaker of the North Carolina House of Representatives, *193 and the President of the North Carolina Senate."
Based on the foregoing Findings of Fact and Conclusions of Law, the Administrative Law Judge makes the following:
RECOMMENDED DECISION
The designation of the position as exempt be reversed.
As can readily be seen, only finding 3 was in any way related to the issue to be resolved at the contested case hearing, and none of the conclusions were in any way based upon that finding. Most of the other findings and all of the conclusions were based upon considerations of whether being a "political confidant" of the Governor or being affiliated with a particular political party was "an appropriate requirement for the effective performance" of the position at issue. The recommended decision quite simply did not mention or address the single issue properly presented by the parties and to be decidedwhether the position of Chief of the Internal Audit Section in DOT had properly been designated by DOT as a policymaking exempt position in accordance with all the provisions of N.C.G.S. § 126-5. Therefore, the recommended decision was not only affected by, but was the result of, an error of law.
The Commission's decision and order merely adopted the findings of fact and conclusions of law of the ALJ as its own and ordered that the designation of the position in question as policymaking exempt under N.C.G.S. § 126-5 be reversed. The result was to repeat the error of law affecting the recommended decision of the ALJ. Therefore, the order of the Superior Court based upon its findings and conclusions to the effect that the decision of the Commission "was not affected by any error of law" was erroneous and was properly reversed by the Court of Appeals.
Having determined that the Commission had committed error of law and that the order of the Superior Court must be reversed for concluding to the contrary, the Court of Appeals could have remanded this case to the Superior Court for further remand to the Commission with instructions that the Commission address and resolve the question of whether the position at issue had been properly designated as policymaking exempt in accord with N.C.G.S. § 126-5. Instead, the Court of Appeals concluded that "the undisputed record evidence" and the single finding by the Commission relating to the matter at issue before it supported a conclusion that the position of Chief of the Internal Audit Section of DOT was properly designated policymaking exempt. Accordingly, the Court of Appeals remanded with the mandate that the position of Chief of the Internal Audit Section be designated policymaking exempt. The Court of Appeals did not err in this regard.
The proper scope of judicial review to be applied in an appeal from a decision of a state administrative agency depends on the issues presented on appeal.
Our courts have held that if it is alleged that an agency's decision was based on an error of law then a de novo review is required. Brooks, Comr. of Labor v. [McWhirter] Grading Co., 303 N.C. 573, 281 S.E.2d 24 (1981). "`When the issue on appeal is whether a state agency erred in interpreting a statutory term, an appellate court may freely substitute its judgment for that of the agency and employ de novo review.'" Id. at 580-81, 281 S.E.2d at 29, quoting Savings & Loan League v. Credit Union Comm., 302 N.C. 458, 465, 276 S.E.2d 404, 410 (1981). A review of whether an agency decision is supported by sufficient evidence requires the court to apply the "whole record" test. Thompson v. [Wake County] Board of Education, 292 N.C. 406, 233 S.E.2d 538 (1977). The "whole record" test is also applied when the court considers whether an agency decision is arbitrary and capricious. High Rock Lake Assoc. v. Environmental Management Comm., 51 N.C.App. 275, 276 S.E.2d 472 (1981).
Brooks v. Rebarco, Inc., 91 N.C.App. 459, 463, 372 S.E.2d 342, 344 (1988). However, in the present case, the decision of the Court of Appeals must be affirmed no matter which standard is applied.
The sole issue raised by petitioner Hodge in his petition for a contested case hearing *194 was whether his position was a "`policymaking position' as defined in NCGS 126-5(b)." At all times pertinent to this appeal, N.C.G.S. § 126-5(b) defined "policymaking position" as "a position delegated with the authority to impose the final decision as to a settled course of action to be followed within a department, agency, or division." The only finding by the Commission relating to the question of whether the position held by Hodge was "delegated with the authority to impose the final decision as to a settled course of action to be followed within a department, agency, or division" was finding 3, which stated:
As Chief of the Internal Audit Section, the Petitioner exercised broad flexibility and independence. In addition to supervising other auditors, he could decide who, what, when, how, and why to audit within the Department. While he could not order implementation of any recommendations, he was free to contact the State Bureau of Investigation concerning his findings.
(Emphasis added.) Certainly, the uncontroverted evidence compelled this finding by the Commission, but the uncontroverted evidence also required additional findings.
According to the job description for the position of Chief of the Internal Audit Section, the person holding that position independently directs and supervises all activities and personnel in the Internal Audit Section. The Internal Audit Section is responsible for all internal audits of DOT, which include financial and compliance audits, economy and efficiency audits, management analysis audits, and special investigative audits. Those audits encompass all activities and phases of operations within the Division of Highways, the Division of Motor Vehicles, the State Ports Authority, and the Governor's Safety Program. Auditors are assigned by the Chief of the Internal Audit Section to conduct particular audits, and the Chief of the Internal Audit Section also controls the scope, objectives, findings, and recommendations of any audit conducted in any of the divisions of DOT. Further, the Chief of the Internal Audit Section prepares manuals, guide programs, and audit procedures and gives related instructions for all auditors to utilize in performing audits throughout the entire DOT. The testimony of petitioner Hodge was that his decisions in all the foregoing regards were not reviewable or reviewed by anyone in DOT or elsewhere. All of this evidence was uncontroverted before the Commission and is unchallenged on this appeal.
I conclude that the unfettered and unreviewable power to establish auditing procedures to be applied throughout an entire department of government and to implement those procedures throughout the entire department, combined with the unfettered and unreviewable power to decide who and what throughout the department will be audited, when those audits will be conducted, the manner in which audits will be conducted throughout an entire department, and whether findings of any audit conducted within the entire department shall be referred to the State Bureau of Investigation, is the power "to impose the final decision as to a settled course of action to be followed within a department, agency, or division" within the meaning of N.C.G.S. § 126-5(b). The uncontroverted and incontrovertible evidence of record before the Commission and before this Court establishes that the position of Chief of the Internal Audit Section carries with it these powers and more. Accordingly, I believe that the Court of Appeals was correct in holding that the Commission's findings and the record evidence compelled the legal conclusion that the position of Chief of the Internal Audit Section is a "policymaking position" within the meaning of N.C.G.S. § 126-5(b) and had properly been designated as such. Accordingly, I would affirm the decision of the Court of Appeals.
For the foregoing reasons, I must respectfully dissent.
NOTES
[1]  We recognize at the outset that the relevant provisions of the SPA have recently been amended. However, we construe the statute as it existed for purposes of this case.
[2]  The panel was also charged with identifying confidential positions which would be exempt pursuant to N.C.G.S. § 126-5(c)(2).
[3]  There was an initial determination, on or before 12 February 1993 and prior to the review by the panel of personnel officials, that certain positions were exempt.
