We should admit it. There was a breakdown in the balanced operation of the US government.

Amid his first acts in office, President Obama set a timeline for the closure of Guantánamo Bay and secret detention facilities around the world, ended abusive interrogation techniques, and lifted secrecy restrictions ordered by President George W. Bush on the records of past presidents. These moves are welcome, but they do not change the fact that during the last administration, President Bush and Vice President Cheney were confronted with too few checks on their expansive interpretation of executive power.

It's time for some rewiring. Just as we have to create new strategies to deal with shortcomings recently revealed in our economic system, we have to address this lack of accountability within the executive branch. One simple solution lies in how the attorney general is appointed.

It is the attorney general's responsibility to ensure that the laws of the country are enforced, including against the country's highest office holders. Yet, in our current system the attorney general's loyalty is torn between the laws he or she swears to uphold and the president.

Attorney Generals John Ashcroft and Alberto Gonzales were widely seen by critics as too beholden to President Bush and his far-reaching vision of executive power to effectively police the president or his administration. Such conflicts of interest are not new. Eric Holder's nomination for attorney general is currently stalled because he supposedly showed too little independence as deputy attorney general when recommending pardons favored by President Clinton.

The answer to this problem lies not in decrying the politicization of the attorney general's office by presidents, but instead in making the attorney general independent and politically accountable through nationwide election.

An elected attorney general would have the democratic legitimacy and mandate to check the power of the president while ensuring the laws of the land are enforced.

The vast majority of states already use this structure. Many of these states once had attorney generals appointed by either the governor or legislature, but abandoned this system, largely in the 19th century, in favor of direct elections. As academics like Professor William Marshall at the University of North Carolina law school have pointed out, the federal government has failed to catch up with the rest of the nation.

Since an elected attorney general would be directly answerable to voters, he or she would probably not give the president too much latitude, even if they hailed from the same political party.

We might be concerned that an attorney general from a different political party as the president may bring spurious litigation against the executive. But even if the attorney general did, we can rely on the courts to quickly throw out these challenges.

In any case, if he or she were perceived as unnecessarily hampering the president's agenda, that person would have their political career to worry about.

Electing an attorney general not only creates a greater and needed check on the president, it is also more democratic. Voters rarely agree with presidential candidates on all issues. An elected attorney general better captures voter preferences for this office, and unlike the case with other cabinet positions, the attorney general's independence would not create clear conflicts with the president's ability to implement his or her policies.

After all, the attorney general is just charged with enforcing the law. The states already show the workability of splitting the executive's power in this way.

Many Democrats have urged that Bush and members of his administration should be investigated and, if warranted, prosecuted. It is important that our laws be enforced against everyone, including the executive. However, this should not happen in an ad hoc manner only after presidential power changes hands.

Instead, we need attorney generals who are ever vigilant in their duties. Congress should create a panel to not only investigate what laws, if any, were violated by the last administration, but even more important to study what reforms are needed to ensure the executive's power is adequately checked in the future. Creating an independent and politically accountable attorney general should be at the top of their list.

• Nick Robinson is a visiting fellow at the Centre for Policy Research in New Delhi. He researches issues of comparative constitutional law.