You need to use a "proxy" table: tt = {'a', 'b', 'cc'} old_tt = tt tt = {} mt = { __newindex = function(table, key, value) error("Attempt to modify read-only table") end, __index = old_tt } setmetatable(tt, mt) -- Geoffroy Carrier