RICHMOND — Starting Sunday, Virginians have to bring identification to the polls with them, undergo pre-abortion sonograms and pay for ignition interlock devices on their cars if they are convicted of drunken driving.

      Laws passed by the long-running, often fractious 2012 General Assembly take effect July 1, including some of the most divisive measures.

      Other new laws also take effect along with a brand-new $85 billion state budget for the newborn state fiscal year 2013.

      All public schools will have injectable epinephrine to administer to children with extreme allergic reactions after a child suffered a deadly allergic reaction to a peanut at a Richmond area school.

      In the wake of the Penn State child sex abuse scandal, failing to swiftly report child molestation becomes a more serious and costly offense for people in specific positions, including sports coaches, with a tenfold increase in fines.

      And private or nonprofit adoption agencies may refuse to place a child in foster care or with adoptive parents if the placement would violate the organization’s moral or religious beliefs, including opposition to homosexuality.

      The ultrasound mandate for abortions drew large Capitol Square protests that, in March, resulted in the arrest of 30 protesters during a Capitol steps sit-in. It also brought ridicule for Virginia officials, including Republican legislators and Gov. Bob McDonnell, from “Saturday Night Live,” “The Daily Show with Jon Stewart” and other cable and late-night television personalities.

      Initially, the GOP-backed legislation would have compelled women to undergo a vaginally invasive form of ultrasound, which opponents labeled state-mandated sodomy. Republicans countered that “transvaginal ultrasounds” are common practice in very early term abortions. But as the state became a laughingstock, McDonnell persuaded House and Senate Republicans to water down the bill my eliminating the mandated invasive procedure. It sailed through the House, with its lopsided Republican majority, but emerged from the evenly split Senate only after hours of searing debate. Democratic amendments that would have required insurance companies to pay the costs or have the state pay the bills for uninsured women were also rejected. McDonnell signed the bill into law.

      The tighter voter ID requirements evoked angry comparisons to Jim Cro-era voter suppression tactics from opponents who say it targets minorities, the elderly and poor. It requires voters who lack proper identification to cast provisional ballots that are counted only if the voter later presents valid ID to local election officials. Present law allows voters lacking ID to cast regular ballots after signing affidavits affirming they are who they claim to be.

      And while the effective date is July 1, it still needs approval from the U.S. Justice Department under the 1965 Voting Rights Act.