At the end 1918 , she had an affair with Rainer Maria Rilke .
They remained friends until Rainer Maria Rilke 's death .
At the end 1918 , she had an affair with Rainer Maria Rilke and they remained friends until his death .