"To work for liberty is to commit oneself to the integral and integrating development of individuals and the community," the pope said at the Presidential Palace.
"If today we can celebrate, it is due to all those who blazed trails and opened a door to the future, and bequeathed to you that same responsibility: to open a door to the future by looking to everything that stands at the service of life, of generating life," the Holy Father said.
Congratulating Latvia on the centenary of its independence, the pope said the country faced difficult social, political, economic and spiritual struggles in the past but today it has become one of the principal cultural, political and shipping centers of the region.
"You know all too well the price of that freedom, which you have had to win over and over again," the pope said.
Later on, the pope will visit the Freedom Monument where he plans to meet with children, young people and families.
Latvian President Raimonds Vejonis said the papal visit would be "a powerful impetus to pursue the ideals of human dignity, freedom, and justice".
"Your visit will inspire and strengthen our families, our society, and our country", the president said.
He noted, however, that not all Latvians feel the country's progress in their daily lives as many of them suffer from poverty, with migration and broken relationships being a common consequence. Addressing representatives of the government and the public, the pope also paid attention to religious diversity.
Acknowledging the impact of the Catholic Church and other Christians churches on Latvia's history, Pope Francis said religious cooperation in Latvia shows that "it is possible to build communion within differences".
"It happens when people are motivated to leave superficial conflicts behind and to see one another in their deeper dignity," the Holy Father said, which reflects the pontiff's aspiration to unite Christians of different denominations.
Vatican figures show that 25 percent of the Latvian population are Lutheran, 21 percent are Catholic and 11 percent are Orthodox.
Later on, the pope will say an ecumenical prayer at the Riga Cathedral. He's chose a Lutheran church for the event.
The pontiff will also visit the Freedom Monument in Riga and travel to Aglona Basilica to celebrate the Holy Mass at one of the most important churches for Latvian Catholics.