On Jan. 8, 2002, President George W. Bush signed into law the K-12 No Child Left Behind (NCLB) law. It was hailed as a civil rights law that would help historically marginalized students but is better known for ushering in the high-stakes standardized testing era.

The law — a compromise version was approved by the House and Senate in December 2001 — had bipartisan support. In fact, it was crafted with the help of Sen. Edward M. Kennedy of Massachusetts, a liberal Democrat who did not often embrace Republican legislation. The votes in the House and the Senate were lopsided, with the House voting 381 to 41 and the Senate 87 to 10.

Two of the leading candidates for this year’s Democratic presidential nomination were in Congress at the time: former vice president Joe Biden, then a senator from Delaware, and Sen. Bernie Sanders (I), then a member of the House from Vermont.

Vice President Pence was a Republican House member from Indiana.

How did the three vote? Biden voted in favor of the final legislation. Sanders, a self-described democratic socialist, did not. Neither did the very conservative Pence, but their reasons were far from the same.

Pence viewed the measure as a federal intrusion into education policy he believed rested with the states.

Sanders has said, including in a USA Today opinion piece published Wednesday, that he opposed it because he knew then that “so-called choice and high-stakes standardized testing would not improve our schools or enhance our children’s ability to learn.” The long-term effects of NCLB, he said, “have been disastrous.”

NCLB’s chief mechanism required all public schools to give students standardized tests in most grades every year and use the results to determine how well schools were helping students achieve. Schools were supposed to review the scores of certain groups of students, aiming to show how historically marginalized students were being left behind. Public schools deemed to be failing because of low scores had to choose an intervention from several offered under the law, including reopening as a charter school. Charters are publicly funded but privately operated.

Problems emerged quickly. Critics warned that using test scores for high-stakes purposes was a misuse of the exams and that NCLB had set an impossible goal by declaring that virtually all students would be “proficient” in reading and math by 2014. The law’s authors knew that was unrealistic but assumed the law would be rewritten in 2007. It wasn’t. Increasingly, schools — including high-performing ones — were considered failing because of peculiarities in the law’s language and the way states implemented it. In addition, many schools cut back or eliminated instruction in history, science and other subjects that weren’t among the two being tested: reading and math. And test prep became a key focal point of the school day.

The Obama administration, to the dismay of many educators, raised the stakes on standardized testing, coercing states to use the scores to evaluate teachers. In 2015, Congress passed the successor to NCLB, called Every Student Succeeds Act, and stripped the federal government of some of the education policymaking power it had taken — but it kept the testing mandate.

In his op-ed, Sanders said as president he would end the federal mandate that public schools give standardized tests to most students every year for the purposes of school accountability.

The long-term effects of this approach have been disastrous. NCLB perpetuated the myth of public schools and teachers as failing, which opened the door for the spread of school voucher programs and charter schools that we have today. Some of these charter schools are operated by for-profits; many of them are nonunion and are not publicly accountable.

Last month, Biden was asked about high-stakes standardized testing at a Democratic candidate forum on education. “If you are elected president, will you commit to ending the use of standardized testing in public schools?” he was asked. Biden replied he would: “Teaching to a test underestimates and discounts the things that are most important for students to know.”

Biden has not spoken at length about the Obama administration’s record on education policy but has taken some contrary positions during this campaign. President Barack Obama’s Education Department spent millions of dollars to expand charter schools, but Biden has said he opposes for-profit charters and is concerned some school districts are harmed financially by charters. He also said he opposes evaluating teachers with test scores.