diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index 4bfef06..a62d978 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -84,6 +84,10 @@
                      [this](const pldm_msg* request, size_t payloadLength) {
                          return this->getBIOSTable(request, payloadLength);
                      });
+    handlers.emplace(PLDM_SET_BIOS_TABLE,
+                     [this](const pldm_msg* request, size_t payloadLength) {
+                         return this->setBIOSTable(request, payloadLength);
+                     });
     handlers.emplace(PLDM_GET_BIOS_ATTRIBUTE_CURRENT_VALUE_BY_HANDLE,
                      [this](const pldm_msg* request, size_t payloadLength) {
                          return this->getBIOSAttributeCurrentValueByHandle(
@@ -222,6 +226,40 @@
     return response;
 }
 
+Response Handler::setBIOSTable(const pldm_msg* request, size_t payloadLength)
+{
+    uint32_t transferHandle{};
+    uint8_t transferOpFlag{};
+    uint8_t tableType{};
+    struct variable_field field;
+
+    auto rc = decode_set_bios_table_req(request, payloadLength, &transferHandle,
+                                        &transferOpFlag, &tableType, &field);
+    if (rc != PLDM_SUCCESS)
+    {
+        return ccOnlyResponse(request, rc);
+    }
+
+    Table table(field.ptr, field.ptr + field.length);
+    rc = biosConfig.setBIOSTable(tableType, table);
+    if (rc != PLDM_SUCCESS)
+    {
+        return ccOnlyResponse(request, rc);
+    }
+
+    Response response(sizeof(pldm_msg_hdr) + PLDM_SET_BIOS_TABLE_RESP_BYTES);
+    auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
+
+    rc = encode_set_bios_table_resp(request->hdr.instance_id, PLDM_SUCCESS,
+                                    0 /* nxtTransferHandle */, responsePtr);
+    if (rc != PLDM_SUCCESS)
+    {
+        return ccOnlyResponse(request, rc);
+    }
+
+    return response;
+}
+
 Response Handler::getBIOSAttributeCurrentValueByHandle(const pldm_msg* request,
                                                        size_t payloadLength)
 {
