The incident allegedly took place while the two were on a break from patrolling.
A federal judge has ordered the Trump administration to end the deployment of California National Guard troops in Los Angeles.
At a hearing in San Francisco, U.S. District Judge Charles Breyer suggested conditions in Los Angeles had changed since the initial deployment, and he questioned whether the administration could control state Guard troops "forever" under its interpretation of federal law.
Lakanwal, the 29-year-old Afghan national, pleaded not guilty to the charges through a court-appointed attorney.
As investigators continue to delve into what may have motivated the suspect in the deadly National Guardsmen shooting, a portrait of a life of increasing financial stress and a potential mental health crisis has emerged, sources familiar told ABC News.
DHS Secretary Kristi Noem said that the suspect in Wednesday's National Guard shooting may have been radicalized in the U.S.