On July 2, 1964, U.S. President Lyndon B. Johnson signs into law the historic Civil Rights Act in a nationally televised ceremony at the White House.

In the landmark 1954 case Brown v. Board of Education, the U.S. Supreme Court ruled that racial segregation in schools was unconstitutional. The 10 years that followed saw great strides for the African American civil rights movement, as non-violent demonstrations won thousands of supporters to the cause.

Memorable landmarks in the struggle included the Montgomery bus boycott in 1955—sparked by the refusal of Alabama resident Rosa Parks to give up her seat on a city bus to a white woman—and the “I Have a Dream” speech by Martin Luther King, Jr. at a rally of hundreds of thousands in Washington, D.C., in 1963.

READ MORE: The Long Battle Towards the Civil Rights Act of 1964

As the strength of the civil rights movement grew, John F. Kennedy made passage of a new civil rights bill one of the platforms of his successful 1960 presidential campaign. As Kennedy’s vice president, Johnson served as chairman of the President’s Committee on Equal Employment Opportunities. After Kennedy was assassinated in November 1963, Johnson vowed to carry out his proposals for civil rights reform.

The Civil Rights Act fought tough opposition in the House and a lengthy, heated debate in the Senate before being approved in July 1964. For the signing of the historic legislation, Johnson invited hundreds of guests to a televised ceremony in the White House’s East Room.

After using more than 75 pens to sign the bill, he gave them away as mementoes of the historic occasion, in accordance with tradition. One of the first pens went to King, leader of the Southern Christian Leadership Conference (SCLC), who called it one of his most cherished possessions. Johnson gave two more to Senators Hubert Humphrey and Everett McKinley Dirksen, the Democratic and Republican managers of the bill in the Senate.

The most sweeping civil rights legislation passed by Congress since the post-Civil War Reconstruction era, the Civil Rights Act prohibited racial discrimination in employment and education and outlawed racial segregation in public places such as schools, buses, parks and swimming pools.

In addition, the bill laid important groundwork for a number of other pieces of legislation—including the Voting Rights Act of 1965, which set strict rules for protecting the right of African Americans to vote—that have since been used to enforce equal rights for women as well as all minorities and LGBTQ people.

READ MORE: Civil Rights Movement Timeline