Alban Gerhardt. (Neda Navaee)

Many themes unified the concert that German cellist Alban Gerhardt played Saturday at the Library of Congress. All of the music he performed was from the 20th century, most of the composers were American and many of the pieces were composed for Mstislav Rostropovich. The choices were to Gerhardt’s credit, but as in his last appearance with the Baltimore Symphony Orchestra in June, the results were mixed.

Two excellent sonatas filled the first half, beginning with Cello Sonata, Op. 6, by the young Samuel Barber.

Gerhardt filled the Coolidge Auditorium with an ardent tone, especially on the high strings, slashing upward on the first movement’s main theme but infusing the second theme with Brahmsian tenderness. After a slow introduction of fragile beauty, the second movement bubbled away with excitement, with pianist Anne-Marie McDermott providing both amassed power and often self-effacing softness.

Benjamin Britten’s Cello Sonata in C, Op. 65, one of the pieces created for Rostropovich, was the most accomplished work on the program, featuring an endless variety in harmony, texture and form. Gerhardt showed polish in the pizzicato second movement, a furious toccata with every type of plucked note possible, and in the glissando harmonics of the fourth movement’s perverse march and the angry off-string passages of the ­perpetual-motion finale.

Nothing in the second half quite measured up to these two pieces, except Lukas Foss’s enthusiastic “Capriccio,” pleasingly bracing after the repetitive dullness of Leonard Bernstein’s “Three Meditations From ‘Mass.’ ”

Anne-Marie McDermott. (Courtesy of Anne-Marie McDermott)

The double-stops of Jascha Heifetz’s violin arrangement of Gershwin’s “Three Preludes” did not work so well on the cello, leading to Gerhardt’s weakest moments in intonation. Astor Piazzolla’s “Le Grand Tango,” another showpiece made for Rostro­povich, felt like an extended encore.